Registered Users
  • Content count

  • Joined

  • Last visited

Community Reputation

367 Excellent


About Cyberboy2000

  • Rank
    Senior Member


Oxygen Not Included
  • Alpha Contributor

Recent Profile Visitors

2,298 profile views
  1. You should have a folder inside your mods folder named workshop-569390373 or something like that. Inside that there should be two kwad files, a txt file, a jpg file and a zip file named scripts. If it does look like that and still doesn't work you might have to update the game. If that doesn't help you should post the log file which is located in Documents\Klei\InvisibleInc\logs.
  2. I don't think that could happen, the effects of tags are not dependent on triggers as far as I know (and it's also completely separate from the observed effect), but just in case you can use this code to force an update: sim():dispatchEvent( simdefs.EV_UNIT_GOALS_UPDATED, {unitID = unit:getID()} )
  3. Programs use TRG_START_TURN to check for new turns. I wouldn't recommend changing the timing of the trigger, because there is too much that depends on it, however if you replace simengine.endTurn instead you can make endTurn and thus the trigger be called before your code.
  4. That... looks like it should work. You sure you haven't missed something different like an include? If not I think I have to try it for myself. Edit: Nevermind, I just realized what the problem is. onStartTurn is only called for units whose turn it currently is. Use a for loop like in your original post and replace simplayer.onStartTurn instead of simunit.onStartTurn.
  5. Um, you already have that function remember? sim:getCurrentPlayer():isPC()?
  6. The p and the u need to be capitalized. The function is called addCPUs.
  7. Akumas can't attack enemies with more than 2 armor and neither version of Obake can attack enemies with any armor.
  8. 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.
  9. Right, I forgot you need to add return hudObject
  10. 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.
  11. You haven't defined pcPlayer. Therefore if pcPlayer then always fails. You need this code: local pcPlayer = self._game.simCore:getPC()
  12. 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 hud = include( "hud/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 hud = include( "hud/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.
  13. 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.