predefined scripts and vars + efficiency of getCoresWithVar

Started by Tyler21, April 20, 2015, 09:30:43 AM

Previous topic - Next topic

Tyler21

Is there somewhere a list of predefined scripts and their respective vars?
I mean scripts such as the "0" script for emitters or res packs and vars such as "AMT" or "resourceType".

Maybe I am looking at the wrong places, but I can't find these in the reference or in the cheatsheet. I figured out these from others' scripts, but it would be nice too see a collection of predefined scripts and vars that can be set (or at least read).

I am also wondering about the efficiency of the getCoresWithVar call. How efficient is it in terms of game performance compared to a standard getAllUnitsInRange loop that checks for a specific var? Does it have the same underlying method or a different one?
"Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person's capacity to act."
― Mihaly Csikszentmihalyi

Check my collection of the 30 most difficult and challenging maps in Colonial Space!

Telanir

I'm not sure if you mean this, GetScriptVar, I hope it helps.

In terms of the efficiency of GetCores I don't know CW3 internal code but you'd assume it ONLY checks CRPLCores. It's been fairly efficient for me I'd love to hear from Virgil on this topic as well.
Want to make genius CRPL? The new top map? You can start here!

Find out more about Creeper World 3 on the wiki!

CW3, The Sleeper Menace!

Own an iOS device? Check out my game Blobivers

Tyler21

Quote from: Telanir on April 20, 2015, 10:01:28 AM
I'm not sure if you mean this, GetScriptVar, I hope it helps.

Exactly, that was the thing I was looking for! :o I was either blind or those parts were added in the past two months
But is this the full list? Other player units don't have any scripts and/or vars that can be set/read (except for CONSTs)?

"Enjoyment appears at the boundary between boredom and anxiety, when the challenges are just balanced with the person's capacity to act."
― Mihaly Csikszentmihalyi

Check my collection of the 30 most difficult and challenging maps in Colonial Space!

Karsten75

Quote from: Tyler21 on April 20, 2015, 10:15:53 AM
Exactly, that was the thing I was looking for! :o I was either blind or those parts were added in the past two months

Well, page revision history shows it has been around since January 2013. http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getscriptvar&do=revisions