Page 1 of 1
how can I toggle .nocost?
Posted: 13 Mar 2007, 08:46
by PrometheusRising
Well, turning it on was easy, but how can I turn it off? I wanted to try out nano turrets supporting the defence/offence in the "sandbox" game.
I tried the most obvious - ".cost" - unfortunately it didnt work. =)
Posted: 13 Mar 2007, 09:04
by Tobi
You cannot.
Well, maybe trepan made a LUA command lately that has the side effect of resetting unit costs to default, but I do not know it.
Posted: 13 Mar 2007, 10:13
by trepan
.editdefs
http://spring.clan-sy.com/phpbb/viewtopic.php?p=166780
(metalCost, energyCost, and buildTime adjustments all work)
.skip also helps speed up testing.
Posted: 13 Mar 2007, 10:25
by PrometheusRising
thanks
Posted: 13 Mar 2007, 10:55
by trepan
The new FeatureDefs{} table can also be modified when .editdefs
is enabled (as well as the UnitDefs{} and WeaponDefs{} tables). The
FeatureDefs{} table is a little different because the definitions are only
created after they been used by at least one unit. That means that the
ids can vary between games depending on which units were built first.
Code: Select all
/luaui run for k,v in FeatureDefs[18]:pairs() do
print(string.format("%-20s %20s",k,tostring(v)))
end
blocking true
burnable false
collisionSphereScale 1
collisionSphereX 0
collisionSphereY 0
collisionSphereZ 0
deathFeature RockTeeth
destructable true
drawType 0
drawTypeString 3do
energy 0
floating true
geoThermal false
id 18
mass 252
maxHealth 2500
metal 5
modelType 0
modelname objects3d/cordrag
name DRAGONSTEETH_CORE
radius 19.627279281616
reclaimable true
tooltip Dragon's Teeth
upright false
useCSOffset false
xsize 4
ysize 4
pairs function: 0x3faf280
next function: 0x2e67070
P.S. I added line editing recently (including next/prev word movementl).
Combined with the "buffertext" command (shoves text into the console
history), it makes writing/testing little scripts like the above a lot easier.
Posted: 13 Mar 2007, 11:37
by KDR_11k
And don't forget .give
