Registered Users
  • Content count

  • Joined

  • Last visited

Community Reputation

367 Excellent


About Cyberboy2000

  • Rank
    Senior Member

Recent Profile Visitors

2,149 profile views
  1. The p and the u need to be capitalized. The function is called addCPUs.
  2. Akumas can't attack enemies with more than 2 armor and neither version of Obake can attack enemies with any armor.
  3. What exactly is it you are trying to do? You can do just about anything with enough effort, Sim Constructor is just something I made so that others can take little shortcuts.
  4. Right, I forgot you need to add return hudObject
  5. The turret went off overwatch because it turned off when you hacked the Power Supply. If you had waited for next turn it would have killed the guard. It is intentional that guards are interrupted when turrets go on overwatch.
  6. You haven't defined pcPlayer. Therefore if pcPlayer then always fails. You need this code: local pcPlayer = self._game.simCore:getPC()
  7. Replacing anything in hud.lua is a bit tricky, it used to take me a while to do it. Normally, when you want to replace something that is local, you have to replace anything that uses that local something. So in this case you have to change hud:refreshHud() and hud:onSimEvent( ev ) since those are the functions that call refreshHudValues. Those are quite big functions, so it's best to add the code at the end since your replaced function should override the old one. That is also better for compability with other mods. Like this: local hud = include( "client/hud" ) local oldRefreshHud = hud.refreshHud local oldOnSimEvent = hud.onSimEvent function hud:refreshHud() oldRefreshHud( self ) customRefreshHudValues( self ) end function hud:onSimEvent( ev ) oldOnSimEvent( self, ev ) if ev.eventType == simdefs.EV_CREDITS_REFRESH then customRefreshHudValues( self ) end end That's what you would normally do when replacing a local function. However, hud.lua is special. It is deceiving because it's layout is similar to many other files in this game, until you look at the bottom of the file. local function createHud( ... ) return hud( ... ) end return { createHud = createHud } This is the troublemaker. We don't actually have direct access to hud, only the function that creates hud. I have no idea why they decided to do this. It isn't any simpler to write hud.createHud() rather than hud() and in no other game file is this done, but it's there, and here's how to circumvent it: local hud = include( "client/hud" ) local oldCreateHud = hud.createHud hud.createHud = function( ... ) local hudObject = oldCreateHud( ... ) local oldRefreshHud = hudObject.refreshHud local oldOnSimEvent = hudObject.onSimEvent function hudObject:refreshHud() oldRefreshHud( self ) customRefreshHudValues( self ) end function hudObject:onSimEvent( ev ) oldOnSimEvent( self, ev ) if ev.eventType == simdefs.EV_CREDITS_REFRESH then customRefreshHudValues( self ) end end return hudObject end I prefer helping people write their own code over writing the code for them, but I know it took me a while for me to figure this out so I leave it here in the hope that it helps anyone who needs to change anything in hud.lua in the future. Cheers! Edit: What is so troublesome with code tags? Just use the gui to insert tags if it doesn't work for you.
  8. Okay, I checked out the savegame and the guard that was patrolling was armored, it was an Omni Protector that wasn't hacked. Turrets can't attack enemies with more than 2 armor. As for the "OVERWATCH" text, apparently turrets that have recently fired enter overwatch automatically next turn, so nothing to worry about there.
  9. [MOD] Sim Constructor

    Just get Agent Mods Combo by Shirsh. It has an agent (Ghuff) which does the same thing.
  10. It is not possible to do that as far as I know. Lua is a weakly typed language, in fact it is unusually so when it comes to functions. In javascript a function has one place where it's defined and then it remains there all the time. But functions in lua are treated like variables. They can be copied, moved to different places, and they can be replaced. That's a good thing for modders, because if it wasn't possible to do that we wouldn't be able to change existing code and so what we could do would be limited. What you should really get is a good grep tool like PowerGREP or grepWin.
  11. [Mod]Generation Options+

    I think it's just Wodzu's mods that need to be gotten that way. I think he gave up on keeping the forum versions updated when the threads were archived.
  12. The forum version of Programs Extended is outdated. Use and
  13. [Mod]Generation Options+

    Sorry, I meant old version of Sim Constructor. Download it here:
  14. [Mod]Generation Options+

    That bug has already been fixed, are you using an old version of the mod?
  15. Programs Extended. There's a list of mods at the top.