Posted: Fri Oct 11, 2013 5:26 pm Post subject:
Overlay and Terrain question
Subject description: Buildable Crates and trees
So I'm pottering around in the art.ini file, and I notice the following under the [NAWALL] entry:
ToOverlay=NAWALL
A quick search in the rules.ini file shows the [OverlayTypes] list, which includes NAWALL - and CRATE, the Magic Crate of Randomness.
Now, an idea immediately occurs for my Forgotten faction: buildable Crates! Call it salvaged tech, call it mysterious packages from the Tacitus, call it Scrin gifts, call it aid packages from the civilian/GDI/Nod Aid Center - it's a 1x1 building, you build it, and it gives you a Crate.
But.
In art.ini, I create a dummy art entry called [MACRATE], and give it:
ToOverlay=CRATE
However, when you place the building, nothing shows initially. If a unit moves through that same cell, it triggers the crate - but the crate is invisible... until you scroll the screen away, and then return to the same location. THEN, all of a sudden, the Crate is visible.
Any ideas on how to fix this? _________________ Adapt or die QUICK_EDIT
During my tests i had the same issue and didn't found a solution for the graphical update bug.
However, i haven't tried hard to fix it, since buildable crates cause serious trouble in multiplayer matches. Because once picked up, they respawn somewhere else on the map and add to the global amount of random crates. Thus you soon end up having the whole map full of crates. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I was not aware of the crate minimum being increased in this way, will test.
However... If that was the case, could it not be circumvented by creating a second Overlay type - e.g. GIFT - which also has the Crate=yes tag? For enforcing crate minimums, the game looks at the instances of CRATE on the field - so if you use a second crate type, GIFT, the minimum *should* not be affected.
Will test and report back. _________________ Adapt or die QUICK_EDIT
No, every Overlay with Crate=yes and CrateTrigger=yes (both are necessary for special bonus logic) counts as a usual crate and raises the CrateMinimum.
DTA for example has steel and wood crates and both raise the CrateMinimum when placed on maps. _________________ SHP Artist of Twisted Insurrection: Nod buildings
The CarriesCrate=yes tag does not appear to be working, btw - was the first thing I tested.
As for the second crate type - I changed the tags to
Crate=yes
CrateTrigger=no
...and it still worked. It also did not increase the crate minimum with every crate placed and collected.
However, the minimum number of crates DID slowly rise over time (got a GPS crate early on, with a small map), but not at the same rate that I built my GIFT crate. Standard crate minimum is 1; after building and placing about 30 of these GIFT crates, the minimum had gone up to 3.
Weird much...? _________________ Adapt or die QUICK_EDIT
It sure works. You just have to set in the [Basic] map section
TrainCrate=yes
TruckCrate=yes
By default these are set to no.
Tested it myself again, and it does raise the minimum!
Not sure for what CrateTrigger is used (probably for the special map Trigger Event "Pick up Crate")
however with Crate=yes and CrateTrigger=no it still raised the CrateMinimum
I had CrateMinimum=0 and 0 crates on the entire map
i build 2 different crates, pick them up and instantly they respawned the default Crate somewhere else on the map, so i ended up with 2 random crates.
How about limiting the maximum crates? Or is it hardcoded to be CrateMaximum=255 ?
With the update bug, may it be possible to play an animation on the same cell, forcing to update the graphics, or won't it change a thing? _________________
So, yeah, I've created a new acc. 'cause no one could remember Ordosherrscher - and I didn't like that name anyway. QUICK_EDIT
I tested CrateMaximum=0 without any effect. The crates still added to the Minimum and kept respawning.
A CellAnim could indeed work, but this is not necessary since buildable crates shouldn't be done in the first place. _________________ SHP Artist of Twisted Insurrection: Nod buildings
I tested it, too, and have to agree. It doesn't seem to have any effect - so, the main question is: hardcoded or just not working? _________________
So, yeah, I've created a new acc. 'cause no one could remember Ordosherrscher - and I didn't like that name anyway. QUICK_EDIT
according to modenc CrateMaximum is used for the internal table. So when we set it to a low value, it might cause buffer overflow or other IEs after a while ingame if there are more crates than this maximum.
So while the key might work for what it is designed for, it just doesn't works in the way we would like to have it work. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Don't trust DeeZire's descriptions, especially when it comes to such ambiguous claims. In many cases he had to guess the function of INI flags in order to have a comprehensive, albeit often inaccurate, guide. Plus the information is over 10 years behind. _________________
I can tell you from YR that whenever a crate is picked up, a new crate is spawned, no matter how the crate was created. This means it doesn't matter whether you pick up a random crate or a crate spawned by a building, train or truck.
The game will remove random crates after a while and place a new one at an other location, but the non-random crates aren't removed an put somewhere else.
The internal crate table is 256 elements long. It shouldn't crash if CrateMaximum is higher than that. The game just won't create a new crate above that limit. _________________ QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum