xml help

Mehr
21 Apr 2015 03:01 #72271 von Only1Ra
xml help wurde erstellt von Only1Ra
I just figuref out how to change unit sizes changeing values in xml files,but now I have a question,I see there are some heros like tokra and so on who I was ablw to play with in GC spino ultimate war,question is what values I have to change to use the heros in other maps also?like when I start pegasus galaxy,as goauld,I have Baal and Apophis playable right away,how can I add like tokra and osiris also,what value I have to change for that?

Edit: Sorry for the letter mistakes,typing with my phone,hope you understand :)


Admin-Edit(Locutus): Please avoid unnecessary double-posts! Thank you!

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
21 Apr 2015 14:25 #72278 von Imperial
Imperial antwortete auf xml help
There are 3 ways to spawn units of the non player fractions to your fraction. I think I can remember I covered one of this methods in my tutorials, or did I forgot about this.. cant remember.

The 3 main fractions are Tauri (Underworld for FoC, but Rebel for EaW), Goauld (Empire for Eaw, Rebel for Foc) and Wraith ( Empire for FOC only because EAW has only 2 Fractions)

The other Fractions arnt playable by the player, they are simple AI fractions.

First way is: You search in your xml directory for the GC file of the Campaign you want to add them.

There you have to insert the correct ingame unitname into the tag <Starting_Forces>.
Explanation of the syntax of this tag:

<Starting_Forces> Empire, Planet_Name, Empire_Star_Base_1 </Starting_Forces>

- First parameter is the Fraction you want to spawn it for (Empire, Rebel or Underworld).
- Second parameter is the planet where you want it spawned as soon the Galactic Conquest was started (you always have to restart the GC to see the changes you applied for this method. But there is another method that allows spawning of units in a running savegame).

Third Parameter is the ingame name of the Unit you want to spawn. In this case it is a Level 1 Starbase over a planet, but it can also be a Spaceship or a Hero unit.

After adding this changes you have to whether reload .xml library in the running game or restarting the game and starting the campaign with the fraction you just added in parameter 1. Then the unit should spawn there.

Method 2

Search in your GC.xml file for the tag <Empire_Story_Name> or <Rebel_Story_Name> or <Underworld_Story_Name> (depending on which fraction you want to manipulate).

For example, you find the file written into this tag for the Rebels in
\Xml\Story_Plots_Sandbox_???_rebel.xml
In this file you usually find something like Story_Sandbox_???_rebel.xml, which is the story file. You want to inject some code into this file.

These files work with events. The first event there is usually this one:


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


Copy this event here under the "Universal_Story_Start" event or between any other events that already exist there:

<Event Name="Cheating_UnitName_01">
<Event_Type>STORY_ENTER</Event_Type>
<Event_Param1>PlanetName</Event_Param1>
<Event_Param2>FILTER_FRIENDLY_ONLY</Event_Param2>

<Reward_Type>UNIQUE_UNIT</Reward_Type>
<Reward_Param1>UnitName</Reward_Param1>
<Reward_Param2>PlanetName</Reward_Param2>
<Perpetual>False</Perpetual>
</Event>


Any event is mostly diveded into 2 paths:
The event part which checks for a condidtion to trigger (<Event_Type>, <Event_Param1>, <Event_Param2>...)

And the Reward part, which does a action like giving a reward to the player ( <Reward_Type>, <Reward_Param1>, <Reward_Param2> .. and so on)

Once the event triggers for the first time the game will store into the gamesave that this event already fired once. And the game wont try to fire this event again for normal events or events with <Perpetual>False</Perpetual>.

You can fire the event each time the condition was fulfilled using <Perpetual>True</Perpetual> (in this example each time any of your units enters the planet in <Event_Param1> it will fire)

Or if you want a similar event to fire twice only you can make a copy of this event and give it another name ( 01, 02, 03 ...) like:
<Event Name="Cheating_UnitName_02">

And if you want it to fire a bunch of times (but not infinite using Perpetual) just copy it and increase the number from 02 to 03 and so on.

Reward Param1 describes the unit you want to spawn, paste its ingame Unit Name into this tag.
PlanetName has for both to be replaced with a valid planet name in this Galacitc Conquest map.
<Event_Param1> = Once any of your Units (FILTER_FRIENDLY_ONLY) enters this planet, fire the event. <Revard_Param2> = This is the planet where your unit should spawn.

The good thing about this method is, that you can spawn units into a already running savegame without having to restart the gc.

There is a 3rd method. I wrote a Lua script that automatically spawns the desired units.
I can upload it here if you wish it. Altogeter it is easier using the lua script but it still isnt final (the final one will be very noob friendly).

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
21 Apr 2015 15:02 #72280 von Only1Ra
Only1Ra antwortete auf xml help
So sorry you had to reply because I already figured it out,but thanks for the feedback,tho I have some questions,how can I change anubis mothership to destroy enemy ships with one energy weapon shot and also how can I change a hero icon?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
21 Apr 2015 15:14 #72282 von Imperial
Imperial antwortete auf xml help
Hero Icon are covered in one of my video tutorials, there somewhere I show how to insert a .tga file (48x48 pixel) using the mtd editor. Just edit/delete one icon and insert another one with the same name, or insert into the commandbar.mtd and commandbar.tga with the mtd editor and insert ints name into the <Icon_Name> tag with .tga extention: Name.tga

Do you mean Anubis from 1.3 or from Pegasus Chronicles?

You have to look at the Unit abilities for a parameter for inflicted damage.. this is quite a advanced task, these are the tags you need to look for:

<Unit_Abilities_Data SubObjectList="Yes">
<!-- ======= First Ability ====== -->
<Unit_Ability>
</Unit_Ability>
<!-- ======= Second Ability ====== -->
<Unit_Ability>
</Unit_Ability>

</Unit_Abilities_Data>

<!-- ========== Passive Abilities: ========== -->
<Abilities SubObjectList="Yes">

<Ability Name="Name">
</Ability>

</Abilities>
<!-- ========================================== -->

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
21 Apr 2015 15:49 #72287 von Only1Ra
Only1Ra antwortete auf xml help
Anubis from v1.3 and one more question,I added Bastet in my pegasus galaxy GC map,Nicks mod changed it to Ra so I was able to make it playable in my GC but it has no sounds,I made Bastet folder in speech and added some sounds,but I think it needs a path to the folder in some xml file,I found paths for anubis baal and so on,but cant find Bastet or even Zipacna,tho Zipacna has voices in game,where should I make the value for Bastet,I made some cool Ra sounds I wanna use for him :)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
21 Apr 2015 19:49 - 22 Apr 2015 00:35 #72291 von Imperial
Imperial antwortete auf xml help
Note: Stargate uses directorys for Effects, Speech, Engine, Explosions, GUI, Music and Weapons in .\Mods\Stargate\Data\Audio.
You probably want to insert your sound files in .wav format into Speech or Effects directory. For speech it is supposed to be inserted into a subfolder.

Then you need to create own .xml instances of your sound/speech effects into a existing .\Mods\Stargate\Data\Xml\Audio\Heroes\SFX_UnitName.xml or create a own new SFX_UnitName.xml (which needs to be initiated in SFXEventFiles.xml). It is supposed to have this kind of code:

<SFXEvents>

<SFXEvent Name="Unit_Select_Name">
<Use_Preset>Preset_UR</Use_Preset>
<Samples>Data\Audio\Speech\Name\name_select_1_ENG.wav, Data\Audio\Speech\Name\name_select_2_ENG.wav, Data\Audio\Speech\Name\name_select_3_ENG.wav</Samples>
<Localize> Yes </Localize>
<Play_Sequentially> Yes </Play_Sequentially>
<Overlap_Test></Overlap_Test>
</SFXEvent>
<SFXEvent Name="Unit_Attack_Name">
<Use_Preset>Preset_UR</Use_Preset>
<Samples>Data\Audio\Speech\Name\name_attack_1_ENG.wav, Data\Audio\Speech\Name\name_attack_2_ENG.wav, Data\Audio\Speech\Name\name_attack_3_ENG.wav</Samples>
<Localize> Yes </Localize>
<Play_Sequentially> Yes </Play_Sequentially>
<Overlap_Test></Overlap_Test>
</SFXEvent>
<SFXEvent Name="Unit_Move_Name">
<Use_Preset>Preset_UR</Use_Preset>
<Samples>Data\Audio\Speech\Name\name_move_1_ENG.wav, Data\Audio\Speech\Name\name_move_2_ENG.wav, Data\Audio\Speech\Name\name_move_3_ENG.wav</Samples>
<Localize> Yes </Localize>
<Play_Sequentially> Yes </Play_Sequentially>
<Overlap_Test></Overlap_Test>
</SFXEvent>

</SFXEvents>


Make sure to have the correct path (Data\Audio\Speech\..) without mistakes or it wont work.
And replace "Name" and name_move_1_ENG with the name of your Unit.


Finally you then have to search in the Xml of the space/ground unit for the sound tags, and to insert the correct name of xml sound instances into them:

The most important tags for sound/speech effects are these 3:
<SFXEvent_Attack>, <SFXEvent_Move>, <SFXEvent_Select>

For <SFXEvent_Build_Complete> use the same as for <SFXEvent_Select>
And for <SFXEvent_Fleet_Move> use the same as for <SFXEvent_Move>

The other sound tags are these (there might be more I didnt picked up), they all fire in a certain situation:

<SFXEvent_Build_Started/>
<SFXEvent_Build_Cancelled/>
<SFXEvent_Build_Complete/>
<SFXEvent_Ambient_Loop/>
<SFXEvent_Fleet_Move/>
<SFXEvent_Guard/>
<SFXEvent_Stop/>
<SFXEvent_Barrage/>
<SFXEvent_Move_Into_Asteroid_Field/>
<SFXEvent_Move_Into_Nebula/>
<SFXEvent_Damaged_By_Asteroid/>
<SFXEvent_Health_Low_Warning/>
<SFXEvent_Engine_Idle_Loop/>
<SFXEvent_Engine_Moving_Loop/>
<SFXEvent_Engine_Cinematic_Focus_Loop/>
<Death_SFXEvent_Start_Die>Unit_Cruiser_Death_SFX</Death_SFXEvent_Start_Die>


Letzte Änderung: 22 Apr 2015 00:35 von Imperial.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

  • Locutus
  • Locutuss Avatar
  • Offline
  • Administrator
  • Administrator
  • [SGMG] Project Co-Lead, Lead Coder, 3D-Artist
Mehr
21 Apr 2015 20:52 #72292 von Locutus
Locutus antwortete auf xml help

Imperial schrieb: create a own new SFX_UnitName.xml (which needs to be initiated in GameObjectFiles.xml).

Small correction: The file needs to be listed in the SFXEventFiles.xml not in the GOF:)

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
22 Apr 2015 00:37 #72293 von Imperial
Imperial antwortete auf xml help
Thank you Locutus, I edited my post and corrected it.
I wasnt aware that sound files have their own root file.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
23 Apr 2015 23:57 #72345 von Only1Ra
Only1Ra antwortete auf xml help
Thanks,that helped a lot,now I am playing stargate universe GC and I wanna ask how can I get death star,I play as goa'uld,if I cant build it is there a way to make it buildable?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Mehr
24 Apr 2015 00:01 #72346 von Imperial
Imperial antwortete auf xml help
You mean the Starwars Deathstar ?

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 1.260 Sekunden