Cyberboy2000

Registered Users
  • Content count

    651
  • Joined

  • Last visited


Community Reputation

365 Excellent

2 Followers

About Cyberboy2000

  • Rank
    Senior Member

Converted

  • Location It's a secret to nobody
  • Interests Espionage, cyberpunk, game design and mod making
  • Occupation Industrial tactical espionage

Recent Profile Visitors

2,142 profile views
  1. 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.
  2. Right, I forgot you need to add return hudObject
  3. 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.
  4. You haven't defined pcPlayer. Therefore if pcPlayer then always fails. You need this code: local pcPlayer = self._game.simCore:getPC()
  5. 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.
  6. 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.
  7. Just get Agent Mods Combo by Shirsh. It has an agent (Ghuff) which does the same thing.
  8. 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.
  9. 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.
  10. The forum version of Programs Extended is outdated. Use http://steamworkshopdownloader.com/ and http://steamcommunity.com/sharedfiles/filedetails/?id=555765765
  11. Sorry, I meant old version of Sim Constructor. Download it here:
  12. That bug has already been fixed, are you using an old version of the mod?
  13. Programs Extended. There's a list of mods at the top.
  14. It's well known that this can happen, but cooperative pathfinding is very difficult. Even if the game was still actively updated it'd be unlikely that we'd see any change, and now that development is officially over there's no chance.
  15. I haven't checked your savefile yet, but I'm guessing the turret has already killed several guards. Turrets have a limited amount of ammo.