Page 25 of 25

Re: Javascript API documentation

Posted: 01 Sep 2013, 11:03
by NoQ
Yeah, and also scavengers use different textures on urban/rockies.
Great, no more WRF hell for modders!
___________________
Just noticed that enableTemplate() doesn't do anything, neither on 3.1 nor on 3.2.
In both cases everything is controlled via templates.{txt,ini}.

Re: Javascript API documentation

Posted: 01 Sep 2013, 19:26
by Per
Hmm. As far as I can tell, only urban used different baba textures, which is weird. Won't those rockies babas freeze? O_o I can fix this, but should I give rockies babas kevlar vests, while I'm at it?

I didn't realize that about enableTemplate(). Not sure what to do about it. templates.txt|ini sort of does everything you need, I think?

Re: Javascript API documentation

Posted: 01 Sep 2013, 22:47
by Goth Zagog-Thou
I have encountered the same problem as NoQ, Per.

Re: Javascript API documentation

Posted: 02 Sep 2013, 05:57
by NoQ
In fact per-tileset textures (and maybe even per-tileset pies) are a very useful feature. Especially when custom tilesets are around (i had to recolor barbarian huts to fit the volcanic tileset gamma).

As for templates, i'd rather say deprecate templates.ini :3 (keep it only for wzscript) cause right now this is the only use case we have for it, and even this is duplicated. Probably make the js function actually work and add a component-based variant (?)

Re: Javascript API documentation

Posted: 02 Sep 2013, 07:52
by Per
Maybe we should move some of the per-tileset-relevant textures into the terrain directories...

I'm not sure why you need enableTemplate() when you can control it all with greater granularity with enableComponent() already?

Re: Javascript API documentation

Posted: 02 Sep 2013, 19:39
by NoQ
I'm not sure why you need enableTemplate() when you can control it all with greater granularity with enableComponent() already?
Well it all started when we tried to discriminate between necessity to research components and necessity to design a template out of existing components and found that the latter is not always trivially available.

Re: Javascript API documentation

Posted: 12 Oct 2013, 06:43
by NoQ
Looking for a way of working with structure blueprints. Two specific problems:
  • Estimating allocated money. Unlike unit production or research, money is not spent instantly after the construction order is given. So i want to be able to know the net cost of all blueprints at any moment, or at least make it accounted for in queuedPower() (unless it already is).
  • Knowing what oil derricks are already being taken by me and allies. For example, I'd like to be able to cancel oil derrick construction order if my ally has just ordered it as well. It'd also simplify the code that makes sure i don't order the same derrick twice.
Not sure how to implement it. Probably enumBlueprints(player = me) and eventBlueprintAppeared(object).