Currently Online

Latest Posts

Topic: Realistic random events

dfTruF
Avatar
Topic Opener
Joined: 2015-02-15, 21:32
Posts: 17
Ranking
Pry about Widelands
Posted at: 2015-02-17, 21:49

einstein13 wrote:

For me this idea is on the line between making the game more interesting and making the game random.

As I've mentioned before (in this discussed case), the map's creator balances probabilities, not coders of Widelands.

Edited: 2015-02-17, 21:52

Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-02-18, 01:00

SirVer wrote:

It sounds like you suggest adding a UI for scripting and/or adding a text editor into the game. Both are things that I'd rather not do - a ton of work that will not benefit the players, but only the very small fraction of map makers.

Ok, I get your point. Also I know that in Age Of Empires is a part for scripting the scenario. But I never got any idea how to use that. If you will think about adding scripting part into editor, please consider building good documentation first, then providing text editor. Good documentation with code examples (even complex ones) is a very good idea of providing new map makers into work with that. Currently I have some problems with lack of documentation- I have to do work, but I don't know how. It is terribly problematic!

dfTruF wrote:

As I've mentioned before (in this discussed case), the map's creator balances probabilities, not coders of Widelands.

Yes, but consider that: you can set some kind of function that will work generally. If you don't put them- they will have probabilities = 0%. If you put them on whole area- you will have what you want. If you put any of them on small area- you will get area with different probability. The editor there can be a "clickable" part of text editing. That even children who don't know any programming language can provide some maps with random events or other scenarios face-smile.png

I'm just thinking about more complex idea. Lotsssss of work = lots of time to do that.

And how I can think about "clickable" part? Do you know programming language for Lego Robotics? I haven't seen it yet, but I heard that you can make robot working without any knowledge, but you can also make it working in more complex way. For Widelands we don't have to do twice work: just one good with clickable and writeable part.

Rather: example1 than example2

But this is only and idea face-smile.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2015-02-18, 07:00

einstein13 wrote: Currently I have some problems with lack of documentation- I have to do work, but I don't know how. It is terribly problematic!

You know that everything is documented, right? There are tutorials missing, but that is why the scenarios are open source. See https://wl.widelands.org/docs/wl/.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-02-18, 09:25

SirVer wrote:

einstein13 wrote: Currently I have some problems with lack of documentation- I have to do work, but I don't know how. It is terribly problematic!

You know that everything is documented, right? There are tutorials missing, but that is why the scenarios are open source. See https://wl.widelands.org/docs/wl/.

I was talking about another language, not Widelands' Lua scripting.

I've read the documentation (some pages) and now I think that yes, we need tutorial, but when I get to the function documentation- I need some examples. That is tones of work to create that. Maybe I will have some time to try any scenario writing face-smile.png Then I can write something there too. face-smile.png There is lots of work for Widelands and no time... face-confused.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
wl-zocker

Joined: 2011-12-30, 17:37
Posts: 492
Ranking
Tribe Member
Location: Germany
Posted at: 2015-02-18, 18:51

einstein13 wrote:

SirVer wrote:

einstein13 wrote: Currently I have some problems with lack of documentation- I have to do work, but I don't know how. It is terribly problematic!

You know that everything is documented, right? There are tutorials missing, but that is why the scenarios are open source. See https://wl.widelands.org/docs/wl/.

I was talking about another language, not Widelands' Lua scripting.

I've read the documentation (some pages) and now I think that yes, we need tutorial, but when I get to the function documentation- I need some examples. That is tones of work to create that. Maybe I will have some time to try any scenario writing face-smile.png Then I can write something there too. face-smile.png There is lots of work for Widelands and no time... face-confused.png

SirVer: Are you talking about tutorials for the game or for scripting?

einstein13: Examples for most of the functions can be found in a Lua script - you could try to grep for the function name you are interested in. If you are unsure, you can try it out how a function works (I have done that a lot when I wrote the tutorials).


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote
SirVer

Joined: 2009-02-19, 15:18
Posts: 1440
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2015-02-19, 06:54

SirVer: Are you talking about tutorials for the game or for scripting?

Both. I was talking about using the tutorials of the game, looking at their .lua files to figure out how to implement one thing or another, i.e. using them as scripting tutorials besides using them as gameplay tutorials face-smile.png


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1116
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-02-19, 14:06

@wl-zocker: I understad that. I know most of tricks how to get info about functions, but sometimes it is good to have it written by words. Imagine that a child (primary school) have idea of making a Widelands map. What is then? He/she needs lots of help. Without any knowledge of programming he/she wants to build first program. I want to help them too face-smile.png (but probably this will be work for next year or two :P)

and I have another question: is it possible in our lua to provide some kind of "packages" for idea of the topic?

Imagine that somebody created those random events as a package of function. Somebody wants to use them in a very simple way (whole file):

import ("random_event_package.lua")
flood_all_map(deltaTime=600, timeOnGround=100)

or something simillar as above?


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
wl-zocker

Joined: 2011-12-30, 17:37
Posts: 492
Ranking
Tribe Member
Location: Germany
Posted at: 2015-02-19, 18:49

include "path/file.lua" is what you are looking for. Most init.lua files contain one or more of these statements.

More documentation is never bad. You could also make a video tutorial on how to script with Widelands. It is always a question of how much effort it is to create such documentation and to keep it up to date vs. how much it serves for possible scripters. Of course, children have other needs than adults.


"Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg

Top Quote