how can I toggle .nocost?

how can I toggle .nocost?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
PrometheusRising
Posts: 8
Joined: 12 Mar 2007, 14:38

how can I toggle .nocost?

Post 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. =)
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post 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.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
PrometheusRising
Posts: 8
Joined: 12 Mar 2007, 14:38

Post by PrometheusRising »

thanks
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post 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.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

And don't forget .give :P
Post Reply

Return to “Help & Bugs”