Cyberboy2000 Posted December 21, 2015 Share Posted December 21, 2015 This mod is a tool that allows mod makers to edit engine.lua while maintaining compability. Later I will make it possible to change other files too. Feel free to leave a suggestion on what files you want to be able to edit. Update: This mod now comes with Lemonymous's Sequential Mod Loader http://steamcommunity.com/sharedfiles/filedetails/?id=580661011 Here's an example mod that demonstrates how to use it http://steamcommunity.com/sharedfiles/filedetails/?id=580664017 workshop-580661011.zip Link to comment Share on other sites More sharing options...
wodzu_93 Posted December 27, 2015 Share Posted December 27, 2015 Can You add a way to modify client/states/state-something.lua? I tried to add new entries for options like "ALARM TYPES" in state-generation-options.lua (more specifically, append changes to "CUSTOM_OPTIONS" table ) for my Programs Extended mod, but it seems impossible without hardcoding. Link to comment Share on other sites More sharing options...
Cyberboy2000 Posted December 28, 2015 Author Share Posted December 28, 2015 That's a good idea. I'll work on that.I can also try to add a way to determine different values and to make options disabled by default when you are making your own options while I'm at it. Link to comment Share on other sites More sharing options...
Cyberboy2000 Posted December 31, 2015 Author Share Posted December 31, 2015 Updated.You can now change existing generation options or define additional features for your own generation option. Link to comment Share on other sites More sharing options...
wodzu_93 Posted December 31, 2015 Share Posted December 31, 2015 Thanks man, this finally let me get rid of hardcoding extra features. Happy New Year! Link to comment Share on other sites More sharing options...
wodzu_93 Posted January 4, 2016 Share Posted January 4, 2016 Another request if I may. I tried to overwrite "client/hud/hud.lua" functions. It works only on some, don't know why. [ 'local hud = include("hud/hud")' and then overwrite function 'hud:refreshTrackerMusic( hud, stage )' works, but hud:onSimEvent( ev ) does not. ]. EDIT:You might want to upload Sim Constructor to the forums for gog users. Link to comment Share on other sites More sharing options...
Cyberboy2000 Posted January 5, 2016 Author Share Posted January 5, 2016 Hmm, that might be tricky. What exactly are you trying to do? Link to comment Share on other sites More sharing options...
wodzu_93 Posted January 5, 2016 Share Posted January 5, 2016 client/hud/hud:onSimEvent (ev) elseif ev.eventType == simdefs.EV_ITEMS_PANEL then if ev.eventData then if ev.eventData.shopUnit then local shop_panel = include( "hud/shop_panel" ) if ev.eventData.shopUnit:getTraits().storeType=="research" then self:showItemsPanel( shop_panel.research( self, ev.eventData.shopperUnit, ev.eventData.shopUnit, STRINGS.UI.SHOP_RESEARCH, nil,true)) elseif ev.eventData.shopUnit:getTraits().storeType=="server" or ev.eventData.shopUnit:getTraits().storeType=="extraserver" then self:showItemsPanel( shop_panel.server( self, ev.eventData.shopperUnit, ev.eventData.shopUnit )) elseif ev.eventData.shopUnit:getTraits().storeType=="miniserver" then self:showItemsPanel( shop_panel.server( self, ev.eventData.shopperUnit, ev.eventData.shopUnit, STRINGS.UI.SHOP_MINISERVER, true)) else self:showItemsPanel( shop_panel.shop( self, ev.eventData.shopperUnit, ev.eventData.shopUnit )) end else local items_panel = include( "hud/items_panel" ) if ev.eventData.targetUnit then self:showItemsPanel( items_panel.loot( self, ev.eventData.unit, ev.eventData.targetUnit )) else self:showItemsPanel( items_panel.pickup( self, ev.eventData.unit, ev.eventData.x, ev.eventData.y )) end end elseif self._itemsPanel then self._itemsPanel:refresh() endI added new shop variant in ProgramsExtended (sells 4 programs), but what shop menu shows up is dependent on storeType="" variable. This is coded with "if else" and any new non-vanilla shop type will get nanofab window regardless of what it actually sells. I want to add the or ev.eventData.shopUnit:getTraits().storeType=="extraserver" portion of code in line 1823, so my shop displays Shopcat menu. If it turns out to be too much of a problem, don't bother. I doubt anyone else will need to tweak hud stuff, Klei did great job with the UI.Regardless, thanks for help mate. Link to comment Share on other sites More sharing options...
Miderre Posted February 19, 2016 Share Posted February 19, 2016 I could really use some help if anyone could spare the time. I've been trying to make a mod that uses the sim constructor + sequential modloader, but the presence of my mod (it doesn't even need to be activated) causes a frozen black screen when hitting "Start Game" after selecting the generation options. When I looked in the log, I found "workshop-580661011/state-generation-options.lua:519: bad arg" as the last line. Does this mean I'm using the Sequential Modloading part wrong or is it something else? I've attached the full log. invisibleinc.txt Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.