Thread: Modding SW3?
View Single Post
  #2  
Old 05-07-2015, 10:07 PM
nocalora29's Avatar
nocalora29 nocalora29 is offline
¯\_ ͯ‿ ͯ_/¯
 
Join Date: Dec 2011
Posts: 518
Default Problems 2.0

Hello there again, Once Again I've come back struggling with some Problems of mine regarding Scripting.

I hope somebody will be able to help me on this, I really want to get this working.

Here we go:
This Problem drives me Insane, I did try to fix it for quite some time now, but without success...

Maybe I just explain what im trying to do before going deeper into stuff:

I am trying to make an Script which generates Portal Blockades (Gate Blockades/huge Fleets of Random picked Factions defending an Portal) all over the Star Wolves 3 universe, these need to be Destroyed by the Player in order to get past Safely through that particular picked Portal. (They won't go away until they are Terminated)

I have them allready picking random Systems through an created function of mine which Selects them via RND in an lua table.

But the Core script I've written to make them Spawn and do everything else just Crashes the game instantly most of the time, with NO to me valuable information regarding the problem and cause of the crash.

- Well I can FORCE make an Blockade, through the Main Function.
But I seemingly can't make the Generator work... sadly :/

--Now lets get to the deeper Stuff

I have made an Function which gets Executed everytime the player changes an System, and with that Function, I attached another Function- (This method does not cause problems at all, it works most of the time) -which is the Initalization, the Generator, and the Core function of the Gate Blockade Script.

Load Order of these Function in Runtime:
SW3EXP_GateBlockades_Generate(); -> SW3EXP_GateBlockades_Init(); -> SW3EXP_GateBlockades_Slot1_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]
SW3EXP_GateBlockades_Slot2_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]
SW3EXP_GateBlockades_Slot3_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]
SW3EXP_GateBlockades_Slot4_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]
SW3EXP_GateBlockades_Slot5_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]
SW3EXP_GateBlockades_Slot6_Add(TargetPortal, Faction, SystemName); [IF PLAYER ENTERS AFFECTED SYSTEM]

I really have no Idea why, but in the Script "sw3_expansion_GateBlockades.lua" it just crashes every time at the SW3EXP_GateBlockades_Init(); Function as soon as it passes through this IF:
"if cur_loc == GetQuestLabel("__SW3EXP@GateSys_Slot1_AffectedSyst em") then", (Including the other Slot ones), and the times it does not crash, it just doesn't execute the Code.

atleast thats the impression I got from it.

The Files of the Mod (Including the crashing ones of course) are here for DL for Further inspection.
Link


It would be really Awesome if someone would be able to help me on this Matter.

Another Note: These Slot's: "Slot1","Slot2" and so on.. are Simply the same Function in multiple script files, but with minimal altered code in order to make it possible to have Max. 6 Gates blocked at a Time in the universe, But for the problem solving right now, I want to get the First slot working, after that, It will be easy to apply the changes to the other Slots.

If it is any Help, here are the Files which have contact with the Gate Blockade script, or interact with them in some way.
Note: I use the followers.lua script basically almost as an Autorun for other Scripts.

Data\Scripts\include\Addons\sw3_expansion\
sw3_expansion_followers.lua [ Line: 306 ] <-- Loads the Gate Blockade script.
sw3_expansion_functions.lua <- Select Random System function & Select Random Group function
sw3_expansion_GateBlockades.lua <- Slot 1 / Core
sw3_expansion_GateBlockades_2.lua <- Slot 2
sw3_expansion_GateBlockades_3.lua <- Slot 3
sw3_expansion_GateBlockades_4.lua <- Slot 4
sw3_expansion_GateBlockades_5.lua <- Slot 5
sw3_expansion_GateBlockades_6.lua <- Slot 6

Final Note: I Deactivated the Slots 2 - 6 in the system.lst until the main Problem in the Core/Slot1 script is clear.

If there are any Questions left regarding How I did how and where, just tell me.


I Will keep trying to fix this, but I hope somebody with more Experience with this can help me out.
__________________
Discord: Nocalora#6847 | SW3.Expansion Thread | SWX.MouseMovementFix | SWX.TUVMark+Src (.tuv editing Tool) | SWX.SLOTMark+Src (.ini Slots editing Tool)

Last edited by nocalora29; 05-08-2015 at 08:36 PM.
Reply With Quote