Author Topic: Changing the way Rebels unlock their tech  (Read 947 times)

Offline Mighty_moose

  • Regular Member
  • Foreigner
  • *
  • Posts: 3
Changing the way Rebels unlock their tech
« on: May 04, 2017, 08:26:22 am »
Hello all,
I was wondering if anyone here has a tutorial or knowledge of how to modify the way Rebels unlock their tech levels. I would like to give them the same method of unlocking as the Empire, with research centres.

Thanks in advance.  :)

Offline Wariscool

  • Staff
  • Ensign
  • ***
  • Posts: 34
Re: Changing the way Rebels unlock their tech
« Reply #1 on: May 04, 2017, 05:29:56 pm »
Okay, so this will be more complicated that it would initially seem. And I'm not sure if it would work but here I go.

So step 1 would be to go though all the rebel units and change the following lines of code to No
Code: [Select]
<Build_Initially_Locked>Yes</Build_Initially_Locked>
<Build_Can_Be_Unlocked_By_Slicer>Yes</Build_Can_Be_Unlocked_By_Slicer>

This then will make the units available at the tech level stated in the code.


Now the next step would be to simply copy the research building from the Empire and change it's affiliation to the Rebels. Or you could re-enable the rebel tech building in the specialstructures.xml

Then you would need to define the tech upgrades or just copy the Empire ones and change them. These are found in the TechBuilding.xml

Then, in theory, you should be able to build the research centre and then the upgrades for the tech level. It might also pay to remove the ability from R2D2 to slice tech or just remove them all together.

Also bear in mind that the rebel tech level goes from 0 - 4 and the Empire from 1 - 5 in the code. This is adjusted so that they both display tech levels 1 - 5 in game but the code is different. So if the game is displaying tech level 3 for the rebels you are actually on tech level 2 in the game code.

Hope this helps and welcome to the forums.

Offline Mighty_moose

  • Regular Member
  • Foreigner
  • *
  • Posts: 3
Re: Changing the way Rebels unlock their tech
« Reply #2 on: May 28, 2017, 03:14:24 pm »
I foolowed this and it worked great! Only issue is that I can't get the heroes to spawn with the progression of tech levels. Aside from that all good!
Thanks for your help.  :)

Offline Bucman55

  • Regular Member
  • Ensign
  • *
  • Posts: 21
Re: Changing the way Rebels unlock their tech
« Reply #3 on: May 28, 2017, 05:33:55 pm »
I foolowed this and it worked great! Only issue is that I can't get the heroes to spawn with the progression of tech levels. Aside from that all good!
Thanks for your help.  :)

That's handled by story scripting.

Offline Mighty_moose

  • Regular Member
  • Foreigner
  • *
  • Posts: 3
Re: Changing the way Rebels unlock their tech
« Reply #4 on: May 29, 2017, 01:39:51 am »
I foolowed this and it worked great! Only issue is that I can't get the heroes to spawn with the progression of tech levels. Aside from that all good!
Thanks for your help.  :)

That's handled by story scripting.

Care to explain?

Offline Kad_Venku

  • Administrator
  • Senior Lt.
  • ******
  • Posts: 85
Re: Changing the way Rebels unlock their tech
« Reply #5 on: May 30, 2017, 11:14:16 am »
Have a look at the vanilla game's Story_Universal_Triggers_E.xml, Story_Universal_Triggers_E_EXP.xml, Story_Universal_Triggers_R.xml, Story_Universal_Triggers_R_EXP.xml and Story_Universal_Triggers_U.xml.
That should explain it sufficiently.

These are being loaded with all vanilla campaigns. Just make sure that the planets being referenced in the code actually exist.


Story_Universal_Triggers_E_EXP.xml:
Code: [Select]
<?xml version="1.0" ?>

<!--****** This story file is used to automatically set some things that would normally happen ******-->
<!--****** in story mode for the full campaign.  This file should be generic enough to use for  ******-->
<!--****** any sandbox campaign set.                                                           ******-->



<Story>

<Event Name="Universal_Story_Start">
<Event_Type>STORY_ELAPSED</Event_Type>
<Event_Param1>0</Event_Param1>
</Event>


<!-- Empire Hero Release -->


<!-- Spawn Starting Heroes -->
<Event Name="Empire_AI_Unlock_Research_Facility">
<Event_Type>STORY_TRIGGER</Event_Type>
<Reward_Type>BUILDABLE_UNIT</Reward_Type>
<Reward_Param1>E_Ground_Research_Facility</Reward_Param1>
<Prereq>Universal_Story_Start</Prereq>
</Event>

<Event Name="Empire_AI_Heroes_01">
<Event_Type>STORY_TRIGGER</Event_Type>
<Reward_Type>SPAWN_HERO</Reward_Type>
<Reward_Param1>Grand_Moff_Tarkin_Team</Reward_Param1>
<Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Universal_Story_Start</Prereq>
</Event>

<Event Name="Empire_AI_Heroes_02">
<Event_Type>STORY_TRIGGER</Event_Type>
<Reward_Type>SPAWN_HERO</Reward_Type>
<Reward_Param1>Emperor_Palpatine_Team</Reward_Param1>
<Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Universal_Story_Start</Prereq>
</Event>




<!-- Spawn Tech Level 1 Heroes -->

<Event Name="Empire_Enters_Tech_01">
<Event_Type>STORY_TECH_LEVEL</Event_Type>
<Event_Param1>1</Event_Param1>
</Event>

<Event Name="Spawn_Boba_Fett">
<Event_Type>STORY_TRIGGER</Event_Type>
<Reward_Type>SPAWN_HERO</Reward_Type>
<Reward_Param1>Boba_Fett_Team</Reward_Param1>
<Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Empire_Enters_Tech_01</Prereq>
</Event>




<!-- Spawn Time Era 2 Heroes -->

<Event Name="Empire_Enters_Tech_02">
<Event_Type>STORY_TECH_LEVEL</Event_Type>
<Event_Param1>2</Event_Param1>
</Event>

<Event Name="Spawn_Veers">
<Event_Type>STORY_TRIGGER</Event_Type>
<Reward_Type>SPAWN_HERO</Reward_Type>
<Reward_Param1>General_Veers_Team</Reward_Param1>
<Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Empire_Enters_Tech_02</Prereq>
</Event>




<!-- Spawn Time Era 3 Heroes -->

<Event Name="Empire_Enters_Tech_03">
<Event_Type>STORY_TECH_LEVEL</Event_Type>
<Event_Param1>3</Event_Param1>
</Event>

<Event Name="Spawn_Piett">
<Event_Type>STORY_TRIGGER</Event_Type>
                <Reward_Type>UNIQUE_UNIT</Reward_Type>
                <Reward_Param1>Accuser_Star_Destroyer</Reward_Param1>
                <Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Empire_Enters_Tech_03</Prereq>
</Event>



<!-- Spawn Time Era 4 Heroes -->

<Event Name="Empire_Enters_Tech_04">
<Event_Type>STORY_TECH_LEVEL</Event_Type>
<Event_Param1>4</Event_Param1>
</Event>

<Event Name="Spawn_Arc_Hammer">
<Event_Type>STORY_TRIGGER</Event_Type>
                <Reward_Type>UNIQUE_UNIT</Reward_Type>
                <Reward_Param1>Arc_Hammer</Reward_Param1>
                <Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Empire_Enters_Tech_04</Prereq>
</Event>



<!-- Spawn Time Era 5 Heroes -->

<Event Name="Empire_Enters_Tech_05">
<Event_Type>STORY_TECH_LEVEL</Event_Type>
<Event_Param1>5</Event_Param1>
</Event>

<Event Name="Spawn_Thrawn">
<Event_Type>STORY_TRIGGER</Event_Type>
                <Reward_Type>UNIQUE_UNIT</Reward_Type>
                <Reward_Param1>Admonitor_Star_Destroyer</Reward_Param1>
                <Reward_Param2>Coruscant</Reward_Param2>
<Prereq>Empire_Enters_Tech_05</Prereq>
</Event>
</Story>
« Last Edit: May 30, 2017, 11:27:41 am by Kad_Venku »