guiDisable(Globule) ignored?

Having trouble getting the game going or understanding something? Look no further.
Post Reply
Zol
Posts: 4
Joined: Sun Jul 09, 2006 7:11 am

guiDisable(Globule) ignored?

Post by Zol »

I know the current scripting is obsolescent (perhaps - I'm not all that clear on what suggestions are actually being implemented), but I'd still like to do some things in the meantime.

The script compiles, and everything tested so far works except guiDisable() on globule types produced for the swarm (Worker, Explorer,Warrior).

Defense Tower for 2 works, and I can find no difference in spelling or syntax except that my test script is simpler.

So, it works as long as it's pre-compiled.

I see no mention of this problem from anyone else, but can anyone think of likely reasons for failure?
(Maybe I'm using the Compile/Save/OK buttons in the wrong order?)

Incidentally, has anyone worked out the growth rules for trees, wheat, algae, papyrus? Doing long test runs on throwaway maps to try and get usable info is getting tedious.
glob2-0.8.19 - the Gentoo Linux ebuild.
Elvish Pillager
Warrior
Warrior
Posts: 55
Joined: Thu Dec 22, 2005 11:39 pm

Re: guiDisable(Globule) ignored?

Post by Elvish Pillager »

Zol wrote:Incidentally, has anyone worked out the growth rules for trees, wheat, algae, papyrus? Doing long test runs on throwaway maps to try and get usable info is getting tedious.
Worked out? No, we looked them up in the source. Trying to work them out would be almost as bad as reverse-engineering the whole open-source program. ^_^
To feed good generals, you need good food. To grow good food, you need good pastures. To capture good pastures, you need good generals.
Zol
Posts: 4
Joined: Sun Jul 09, 2006 7:11 am

Post by Zol »

Of course, source is the preferred option if the algorithm isn't available separately from the implementation.

Anyway - I was mistaken about guiDisable() working fully in other scripts.
The same problem appears in Tower Defence for 2, but because flags are disabled, I had forgotten the option for non-workers was there.
Perhaps this is just an accepted fact that no-one bothers mentioning anymore, rather than a problem with my build.
Globulation 2 includes a powerful scripting language called "SGSL" ...
...but actually just barely qualified for anything that I'm interested in doing with it as documented, and now slips lower as implemented.

Oh, well. Maybe I'll think of something else that'll make the effort worthwhile.

Maybe I'll try playing online (which seems to be the norm - if this quiet board is any indication).
glob2-0.8.19 - the Gentoo Linux ebuild.
Elvish Pillager
Warrior
Warrior
Posts: 55
Joined: Thu Dec 22, 2005 11:39 pm

Post by Elvish Pillager »

Zol wrote:Maybe I'll try playing online (which seems to be the norm - if this quiet board is any indication).
The ML is more active. Few online games happen - they're about as frequent as forum posts, I think. :|

also, I found this: http://globulation2.org/wiki/Resource_Algorithm
To feed good generals, you need good food. To grow good food, you need good pastures. To capture good pastures, you need good generals.
Zol
Posts: 4
Joined: Sun Jul 09, 2006 7:11 am

Post by Zol »

I was starting to suspect that sand mattered.

Clear enough - except
If the current size of the resource is less than or equal to rand(7), the resource grows by one square. Else, if the resource is capable of extending, it attempts to extend into a random square next to the current one (and does nothing if it fails)
I think, "grows by one square" means increases by one for the current square, although, I'm not sure what resource=6 (and 7, after adding one) can be (I assume rand(7) in [0,6]). 0 to 5 is all the user sees.

So looking for how you found it, discovered the Developer Centre. One of the few links I didn't think would be relevent to mere players. Handy info.

BTW, you reminded me via another post of Wesnoth. Just rediscovering it after having tried a dev version long ago.
glob2-0.8.19 - the Gentoo Linux ebuild.
Post Reply