This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cw4:cmod:docs:e560de12-b7fe-4a15-afe3-9b76ea1fe5f2 [2021/03/20 10:37] – [For Map Makers] UberWaffe | cw4:cmod:docs:e560de12-b7fe-4a15-afe3-9b76ea1fe5f2 [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 24: | Line 24: | ||
====== For Map Makers ====== | ====== For Map Makers ====== | ||
+ | |||
If you have city buildings (units that make use of the " | If you have city buildings (units that make use of the " | ||
Line 30: | Line 31: | ||
The script for this warehouse unit makes use of global variables. See the script for more details. | The script for this warehouse unit makes use of global variables. See the script for more details. | ||
- | In the case that you make unit updates after already having placed down warehouses or " | + | To avoid lag of multiple units processing each tick, the " |
+ | This means that if you update unit instances, you can end up with broken production values. | ||
+ | The units have a means to recalculate from scratch for these situations. To trigger this, refer to the console script below. | ||
- | < | + | In the case that you make unit updates after already having placed down warehouses or " |
- | # Run this script if you want the city production to be recalculated from scratch. # Should be run if you have changes building values or done a “Update all unit instances” while editing the map after buildings are already placed. | + | ---- |
- | 0.0 -> | + | <code 4rpl CityProductionReset.4rpl> |
+ | # CityProductionReset | ||
+ | |||
+ | # Run this script if you want the city production to be recalculated from scratch. | ||
+ | # Should be run if you have changes building values or done a “Update all unit instances” while editing the map after buildings are already placed. | ||
+ | |||
+ | 0.0 -> | ||
+ | 0.0 -> | ||
+ | 0.0 -> | ||
0 -> | 0 -> | ||
- | 0 -> | + | 0 -> |
+ | 0 -> | ||
+ | 0 -> | ||
+ | 0 -> | ||
- | $WAREHOUSE_GUID: | + | $WAREHOUSE_GUID: |
+ | GetUnitsByType(< | ||
+ | GetListCount(< | ||
- | GetGameUpdateCount -> | + | GetGameUpdateCount -> |
+ | </code> | ||
+ | ---- | ||
< | < | ||
+ | |||
+ |