Daedalus, Thermopoly and Stag in endgame

Status
Not open for further replies.
EDIT:
In sr2, groups like the vtol would have been defined in an accompanying cts file that had coordinates and other info like behavior overrides. For example, something like m23.lua would have an accompanying m23.cts file.

Would it specify any related files within the mission lua?
Worst case scenario I could see is removing the cleanups for the troops and vtols on the Daedalus.
Is there any way to check whether a mission has been done or not, since I'm trying to make a function within sr3_city that will trigger the changes, is called by the sr3_city_main function, and can change depending on the choice you made, but at this point operates only on the killbane choice, which I could see causing problems with the Daedalus being there prematurely.
 
Would it specify any related files within the mission lua?

In sr2, using Brotherhood mission 2 as a reference, a small piece would look like something like:
bh02.lua
Code:
    -- Groups --
        GROUP_ALLIES = "bh02_$allies"
        GROUP_BOMB_TARGETS =  "bh02_$bomb_targets"

Then there would be entries in bh02.cts for those. It wouldn't specifically say to look in bh02.cts, that's just where the coordinates and other info are defined and the engine automatically looks for them there.

bh02.cts:
Code:
// -------
#Groups
// -------
 
$Group:    "bh02_$allies"
$Group:    "bh02_$bomb_targets"
.
.
.
.
 
// -------
#Vehicles
// -------
 
$Vehicle:        "bh02_$bomb_target_01"
$Vehicle type:    "suv_4dr_06"
$Start nav:        "bh02_$bomb_target_01"
$Group:            "bh02_$bomb_targets"
$Stream Distance:            50.000
+Hit Points:            10000
+Hostile
+Critical
+Variant: "Gang_BH"
 
$Vehicle:        "bh02_$bomb_target_02a"
$Vehicle type:    "truck_2dr_pickup06"
$Start nav:        "bh02_$bomb_target_02a"
$Group:            "bh02_$bomb_targets"
$Stream Distance:            50.000
+Hit Points:            10000
+Variant: "Gang_BH"
 
$Vehicle:        "bh02_$bomb_target_03"
$Vehicle type:    "truck_4dr_pickup04"
$Start nav:        "bh02_$bomb_target_03"
[B]$Group:            "bh02_$bomb_targets"[/B]
$Stream Distance:            50.000
+Hit Points:            40000
+Variant: "Gang_BH"
 
$Vehicle:        "bh02_$bomb_target_02b"
$Vehicle type:    "truck_2dr_pickup06"
$Start nav:        "bh02_$bomb_target_02b"
$Group:            "bh02_$bomb_targets"
$Stream Distance:            50.000
+Hit Points:            10000
+Variant: "Gang_BH"
.
.
.
.
 
$Vehicle:        "bh02_$v000"
$Vehicle type:    "car_4dr_standard07"
$Start nav:        "bh02_$v000"
$Group:            "bh02_$allies"
$Stream Distance:            50.000
.
.
.
$Vehicle:        "bh02_$lin_mobile"
$Vehicle type:    "car_4dr_sports01"
$Start nav:        "bh02_$lin_mobile"
$Group:            "bh02_$allies"
$Stream Distance:            50.000
+Variant: "Donnie"
.
.
.
// -------
#Humans
// -------
 
$Human:                    "bh02_$donnie"
$Char type:                "npc_Donnie"
$Start nav:                "bh02_$donnie"
+Item:                    "satchel"
+Team:                    "Playas"
+Personality:            "gang normal"
+CantFlee
+DontDropCash
+DontDropWeaponOnRagdoll
+DontEffectNotoriety
+IgnoreAttacks
+ShouldNotBeGrabbed
+NeverTurnOnPlayer
+Undismissable
+Group:                    "bh02_$allies"

The actual names of the objects in each group then have coordinates assigned to them in xzy format in the cts for $Pos. The $Orient would be the direction it faces. Something like:

Code:
$Navpoint:    "bh02_$donnie"
$Type:        "ground"
$Pos:            <1122.101318 3.765349 -836.422791>
$Orient:        [0.450250]
.
.
.
$Navpoint:    "bh02_$bomb_target_01"
$Type:        "ground"
$Pos:            <914.962769 -3.848999 277.658997>
$Orient:        [0.140442]
 
$Navpoint:    "bh02_$bomb_target_02a"
$Type:        "ground"
$Pos:            <266.987396 -3.998913 662.578674>
$Orient:        [-1.444378]
 
$Navpoint:    "bh02_$bomb_target_02b"
$Type:        "ground"
$Pos:            <267.551636 -3.998622 677.658020>
$Orient:        [1.407407]
 
$Navpoint:    "bh02_$bomb_target_03"
$Type:        "ground"
$Pos:            <132.136795 -3.994812 583.046631>
$Orient:        [-2.157136]
.
.
.
$Navpoint:    "bh02_$v000"
$Type:        "ground"
$Pos:            <215.316818 -3.999000 970.816284>
$Orient:        [3.067607]
 
$Navpoint:    "bh02_$lin_mobile"
$Type:        "ground"
$Pos:            <1115.967285 3.765350 -834.630676>
$Orient:        [0.069893]

An indexed search on a group reference found in the mission lua may point you to whatever the new files are named with coordinates and group definitions.
 
Is there any way to check whether a mission has been done or not
sr3_city.lua has a block of code that goes like this. Maybe you can use the mission_is_complete function?
Code:
    if not mission_is_complete( "m07" ) then
        -- make sure we unlocked it
        mission_unlock( "m07" )
        mission_set_next_mission( "m07" )
    end
 
An indexed search on a group reference found in the mission lua may point you to whatever the new files are named with coordinates and group definitions.
Would it be in the same str2 as the mission lua, or would I have to do some snooping.
sr3_city.lua has a block of code that goes like this. Maybe you can use the mission_is_complete function?
Code:
    if not mission_is_complete( "m07" ) then
        -- make sure we unlocked it
        mission_unlock( "m07" )
        mission_set_next_mission( "m07" )
    end
Thanks.
Ok, here's what I got for the function. It works post endgame with the save shaundi ending. Anyone willing to test with the kill killbane ending both pre and post daedalus.
Code:
function endgame_content_reenable()
    if game_choice_get_state( MISSION_22_CHOICE ) == M22_CHOICE_KILLBANE_KILL then
        if not mission_is_complete ("m23") then
            traffic_disable_drawbridge_area(34, true) -- Disables splines on road through Sunset Park that STAG cordons off
            set_stag_active(true)
            city_zone_swap("lockdown", true)
            city_zone_swap("stag")
            city_zone_swap("therm3_dst", false)
            city_zone_swap("thermext1", true) -- Thermopolye moves to south of DT
            city_zone_swap("therm2", true) -- This swap just the interior trigger and volume for thermext1.  Those two should be consolidated.
        else
            city_zone_swap("daedext1", true) -- swap in the daedalus exterior
            traffic_disable_drawbridge_area(34, true) -- Disables splines on road through Sunset Park that STAG cordons off
            set_stag_active(true)
            city_zone_swap("lockdown", true)
            city_zone_swap("stag")
            city_zone_swap("therm3_dst", false)
            city_zone_swap("thermext1", true) -- Thermopolye moves to south of DT
            city_zone_swap("therm2", true) -- This swap just the interior trigger and volume for thermext1.  Those two should be consolidated.
        end
       
    elseif game_choice_get_state( MISSION_22_CHOICE ) == M22_CHOICE_KILLBANE_ESCAPE then
        traffic_disable_drawbridge_area(34, true) -- Disables splines on road through Sunset Park that STAG cordons off
        set_stag_active(true)
        city_zone_swap("stag")
        city_zone_swap("lockdown", true)
        city_zone_swap("therm3_dst", false)
        city_zone_swap("thermext1", true) -- Thermopolye moves to south of DT
        city_zone_swap("therm2", true) -- This swap just the interior trigger and volume for thermext1.  Those two should be consolidated.
    end
end
 
Okay I pasted it at the end of the file. (I hope thats the right place), everything went fine until I destroyed Killbanes plane. The game started to load and got stuck in an endless loading loop.
 
Hmmm. Did you put
Code:
endgame_content_reenable()
under sr3_city_main. I'll have to test this problem myself. Also, when did you paste it in. I made a mistake in the placements of the ends, but they should be fixed now. It should be able to go anywhere in the sr3_city file since it preloads all the functions so they can be called from anywhere.
 
No load loop for me when I destroyed Killbane's plane. Got past the cutscene, killed Killbane, through the next cutscene, and back into the open world. Did you have a bunch of crap in the sr3_city.xtbl that might have caused it, or is it fairly clean?
 
I used an unedited one. The way I see it, I simply messed up in the placement. I placed it at the end of the file.
Does the cutscene when the daedalus shows up, glitch when you played the save shaundi ending first?
All other things work fine, except that STAG simply wont spawn on the 2 carriers.
 
No, since it doesn't spawn at all if you just do the ending where you save shaundi. Also, it should, if the code works, check if the mission where you destroy the Daedalus has been completed yet before it makes the Daedalus permanent. I'm not very diligent when I'm supposed to comment code.
 
This is what I ended up doing with the file from the first post. Got rid of zombies, Saintsed™ the Syndicate tower even if the player earlier destroyed it, did some stuff to help replaying mission 6 and whatnot.
I'm still too dumb to make it permanently play that one song..
 

Attachments

  • sr3_city.lua
    9.3 KB · Views: 669
Status
Not open for further replies.
Back
Top