Creative Mod

by jodli

Based on the old Creative Mode mod created by Y.Petremann, then patched by Pac0master, and also the Test Mode mod created by rk84. By enabling Creative Mode in the game, you can access objects that can generate unlimited items, fluid or energy, or nullify them. Perfect for testing purpose or making initial setup for games. Quick patch for 0.16 until an official release - everything should work now. Quick patch for 0.17 until an official release - if ever...

Content
11 days ago
0.17 - 2.0
102K
Cheats

i Healer wand fix for players

2 years ago

The healer wand currently sets an entity's health to the entity's prototype's max_health, but where players are concerned (and possibly other character-style entities) this isn't actually their real max health, since there are both per-force and per-player health bonuses. I did some digging on the lua API docs and found that "player.character.health = player.character.prototype.max_health + player.force.character_health_bonus + player.character_health_bonus" will do the job, tested with the in-game lua console.

It would be nice if the healer wand could detect player character entities and apply this effect to properly reset them to full health, because currently it only ever gets you to 250 (base game max HP) even if you've used this mod to adjust your own max HP.

2 years ago
(updated 2 years ago)

Looking at the code for scripts/magic_wand_healer.lua, I think line 169 is where the extra code needs to be inserted:

local max_health = entity.prototype.max_health -- For all entities in general
if entity.type == "character" then -- But players have individual and force bonuses to max health
    local p = entity.player
    max_health = max_health + p.force.character_health_bonus + p.character_health_bonus
end
2 years ago

Hey!
Should be fixed in the next version.
Thanks!

This thread has been locked.