Jump to content

Spec forces editing


Cpt Moustache
 Share

Recommended Posts

Good morning SWRE community. I am wandering if it is possible to modify the type of mission that the "Spec units" like the Imperial commando is able to do.  I want them to be able to do assassination mission. I want to create a new type of unit too. Something like an engineer or a scientist. I may be wrong but i think these edits are doable via a "hex editor". Is there someone who ever tried to do something similar?

I know that this may not make sense but i'm working on a larger mod and those changes are part of this.

Thank you for your help.

Link to comment
Share on other sites

You may edit the link between Imperial Commandos and Assassination Mission
But no perfect solution if you also want to keep other spec force's mission profiles intact

-SPECFCSD.DAT (SpecForces) Data:  116 bytes (29 Double words) per item.
-MISSNSD.DAT   (Mission)      Data:  112 bytes (28 Double words) per item.

The link among them is located at DWORD_29 for SpecForces item and DWORD_09 for Mission Item

in MIssion's DWORD_09 a pair of mission profiles is set for given mission instance  ( 1st byte = 1st Profile ID / 2nd byte = 2nd Profile ID )
In SpecForces DWORD_29 the Spec Force unit must pick only one of those profiles  (1st OR 2nd )

For Assassination Mission ( ID 81 )  DWORD_09 = hex 00 08 00 00   
This mean only one profile is set (  2nd byte = 08 is the profile used by Noghri Death Commandos )
You may edit the Assassination Mission DWORD_09 to hex 02 04 00 00

Then, change Noghri Death Commandos DWORD_29 (their mission profile) from 00 08 00 00 to 02 00 00 00

-The above change in Assassination Mission  DWORD_09 enables it to the profiles used by Imperial Commandos And Infiltrators
-Further change in Noghri Death Commandos DWORD_29 gives them the profile used by infiltrators ( now with Assassination ! )

----

Hope it helps


 

Edited by Hexdragon
Link to comment
Share on other sites

Thanks HexDragon for your fast reply. I must say i'm very impressed that someone is able to answer to my question. This will not be simple as i see but it looks doable.

What editor do you use? Mine don't seems  to be able to show the strings you mentionned.

Look by yourself

Capture d’écran 2023-02-08 211603.png

Link to comment
Share on other sites

 

Older post on this forum ( like the one below) help a lot 
Then:   hex-editor, free time to expend, and very (very) heavy hand on testing

Also that tool "resource hacker" to check for resource IDs to look for.
Yet that is not involved on this particular one.

 

Link to comment
Share on other sites

Mission ids are binary flags if i recall correctly.

0=nothing

1=mission 1

2=mission 2

4=mission 3

8=mission 4

16=mission 5

32=mission 6

64=mission 7

128= mission 8

...

Sum the numbers on the left (which are 2 to the power of n) to enabled the sumed ones at the same time.

 

Link to comment
Share on other sites

9 hours ago, Metasharp said:

Mission ids are binary flags if i recall correctly.

Initially, I considered too that mission profiles may be handled on a bit-wise basis
But test results suggest is not the case

Custom profiles with values like 0x05, 0x07, 0x0A were evaluated byte-wise

----

Below, Info gathered on MISSNSD.DAT, upon Hex dump review and test


MISSNSD.DAT - Description
=======================

MISSNSD Header:
--------------------

-Header Size: 16 bytes (4 Double words)

DWord_H01:  Unknown_H01
DWord_H02:  Item Count 0x19 (25 items)
DWord_H03:  Asset type ("family") lower limit
DWord_H04:  Asset type ("family") upper limit


MISSNSD Entry:
--------------------

-Mission Entry Size:  112 bytes (28 Double words) per item.

DWord_M01:  Mission ID Number
DWord_M02:  Unknown_M02     / Always 0x01
DWord_M03:  Unknown_M03     / Always 0x00
DWord_M04:  Unknown_M04     / Always 0x00
DWord_M05:  Item's "Family ID"
DWord_M06:  DLL Reference:      First Word references mission name string's Number ID in TEXTSTRA.DLL
DWord_M07:  Available for rebels       (1=Y / 0=N)
DWord_M08:  Available for empire     (1=Y / 0=N)
DWord_M09:  Mission profiles ( meant to be referenced in SPECFCSD.DAT )
DWord_M10:  Unknown_M10     / Recon mission gets 0x00000000. Others get 0x00000100.
DWord_M11:  Unknown_M11
DWord_M12:  Unknown_M12 
DWord_M13:  Continue mission assignment after last mission's outcome (1=Y / 0=N)
DWord_M14:  Unknown_M14     / Player-initiated missions get 0x00. Others get 0x01
DWord_M15:  Unknown_M15     / Bounty Hunter's mission get 0x00. Others get 0x01
DWord_M16:  Unknown_M16     / Player-initiated missions get 0x01. Others get 0x00
DWord_M17:  Unknown_M17     / Player-initiated missions get 0x01. Others get 0x00 or 0x02
DWord_M18:  Unknown_M18     / Either 0x00 or 0x01.
DWord_M19:  Unknown_M19     / Either 0x00 or 0x01.
DWord_M20:  Unknown_M20     / Either 0x00 or 0x01.
DWord_M21:  Unknown_M21     / Either 0x00 or 0x01.
DWord_M22:  Mission can be carried on friendly planet     (1=Y / 0=N)
DWord_M23:  Mission can be carried on neutral planet      (1=Y / 0=N)
DWord_M24:  Mission can be carried on hostile planet       (1=Y / 0=N)
DWord_M25:  Unknown_M25     / Either 0x00 or 0x01.
DWord_M26:  Unknown_M26     / Either 0x00 or 0x01.
DWord_M27:  Unknown_M27     / Either 0x00 or 0x01.
DWord_M28:  Unknown_M28     / Either 0x00 or 0x01.

Open Conjectures:
--------------------------
DWord_M11:  Points gathered upon success (Base)  ???
DWord_M12:  Points gathered upon success (Var)   ???
DWord_M17:  Agent's Destination after mission abort  ???
DWord_M28:  Objective can result killed     (1=Y / 0=N)  ???

Conjectures provided by ThruthRealm
----------------------------------------------------
DWord_M10:  Enable / Disable mission for characters                 >>> ( Verified by Truthrealm )
DWord_M18:  Agent's Destination after mission completion ???
DWord_M19: Requires target to be explored      (1=Y / 0=N)  ???
DWord_M26: Mission aborts upon system's blockade      (1=Y / 0=N)  ???
DWord_M26: Mission aborts upon uprising      (1=Y / 0=N)  ???
DWord_M27: Objective can result in "Escaped"      (1=Y / 0=N)  ???

Mission ID Numbers
---------------------------- 
0x01 Move
0x02 Return
0x03 Autorouting
0x04 Adrift
0x10 Diplomacy
0x11 Rescue
0x12 Sabotage
0x13 Espionage
0x15 Reconnaissance
0x16 Recruitment
0x17 Abduction
0x20 Ship Design Research
0x21 Facility Design Research
0x22 Troop Training Research
0x40 Incite Uprising
0x41 Death Star Sabotage
0x42 Jedi Training
0x43 Dagobah
0x44 Palace
0x45 Vacation
0x46 Sabbatical
0x80 Subdue Uprising
0x81 Assassination
0x82 Pickup
0x83 Bounty

----

Link to comment
Share on other sites

10 minutes ago, Hexdragon said:


DWord_M26: Mission aborts upon system's blockade      (1=Y / 0=N)  ???

Typo correction. it shall be:
DWord_M25: Mission aborts upon system's blockade      (1=Y / 0=N)  ???

Link to comment
Share on other sites

44 minutes ago, Cpt Moustache said:

After my first victory (all credit goes to you) I want to add a new type of spec force. Someone ever did this?

 

Kurukaze was the first guy who got to add a new type of unit, if I am not mistaken
Back in 2007 he got to add two new characters to game
 


Be reading carefully about his method got to add new Troops and Spec Forces 
Also, found the tactical pointer tables he was looking for (#)

(#) 
Sadly those were found inside Rebexe, which was the worst case scenario
Because of the above, limitations that remain are:

-Tactical Pictures
 Those 32x32 pics in TACTICAL.DLL used to display Troops, Spec forces and Characters (as Ship "passengers") during tactical battle  
 The pointers between units IDs in the Strategic part of the game and their tactical images is located in Rebexe
 There are two unused pics ( from Imperial Probe Droid and recon LongProbe Y-Wing recon team ) that can be re-assigned for new units
 Any new unit beyond the first two will lack its passenger picture ( if not taken from an existing unit by editing the pointer table in Rebexe)
 Not a serious limitation though  (IMHO).  The lack of a tactical "passenger" pic does NOT crash the game
 
-Troop Finder / Spec Forces Finder
Both are hardcoded in Rebexe 
Troop finder is limited to 5 units per side
Spec forces finder is limited to 4 units per side
However,  it is possible to edit finders in Rebexe in order to make choice about which units ( originals or new ones ) shall be handled by the finders

-Capital Ships 3D Models
 The pointers between Capital Ship IDs in the Strategic part of the game and the 3D assets is located in Rebexe
 On the other hand even without new 3D-Model new capital ships can be added.  
 In tactical battles new Cap Ships will feature the Mon Calamari Model, which is used by the game as sort of default model

I will expand about the HowToDo in a different post
Also will upload a couple of "extra unit" test bed mini-mods I made in late "pre-pandemic" times
For now, I will left the ultra short version:

The whole process reduces to:
1- Adding the new Entry for the unit in the proper DAT File   ( like SPECFCSD.DAT )  (#)
2- Determine the correct ID numbers for the new unit's resources in DLL files ( BMPs and Text entries )   (##)
3- Add those resources to DLLs using resource Hacker, as well as the "Encyclopedia" picture in EData folder (###)

(#) Dont forget to edit the unit count there

(##) With the exception of TACTICAL.DLL  resource ID numbers of units in DLLs have a mathematical relation with their Unit ID AND/OR
        the first byte of the unit's  DLL reference number  ( Unit Entry's 1st DWORD and 6th DWORD respectively, inside the DAT file )
   
(###) Special care should be taken in BMPs having the correct format and header (otherwise expect game crash)

Regards 
 

Link to comment
Share on other sites

  • 2 weeks later...
On 2/14/2023 at 8:07 PM, Hexdragon said:

Initially, I considered too that mission profiles may be handled on a bit-wise basis
But test results suggest is not the case

Custom profiles with values like 0x05, 0x07, 0x0A were evaluated byte-wise

----
 

My above statement is actually wrong.

Custom values like 0x05, 0x07 and 0x0A in MIssion's DWORD_09  behavior like binary flags, just as Metasharp remarked

Hence:
-A custom mission profile ( 
MIssion's DWORD_09 ) with a value like 0x05  ( 1 + 4  ) will match  SpecForces DWORD_29  with values 0x01 and 0x04
-A custom mission profile ( MIssion's DWORD_09 ) with a value like 0x07  ( 1 + 2+ 4  ) will match  SpecForces DWORD_29  with values 0x01 , 0x02 and 0x04
-A custom mission profile ( MIssion's DWORD_09 ) with a value like 0x0A  ( 2 + 8  ) will match  SpecForces DWORD_29  with values 0x02 and 0x08

On the other hand, custom value like 0x05 in SpecForces DWORD_29 will not match MIssion's DWORD_09 with values 0x01 and 0x04
That's, my former test result.

----


Further, a second ( and cleaner) solution for OP request is available:
In order to give assassination mission to Imperial Commandos, just modify that mission's entry in the second byte of MIssion's DWORD_09  

From 00 08 00 00 to 00 0C 00 00

That will match both :
SpecForces DWORD_29  = 00 08 00 00 ( Noghri Death Commandos ) 
And
SpecForces DWORD_29  = 00 04 00 00 ( Imperial Commandos ) 

----

Regards

p,s
The extra units mini-mod, referred in previous post, has been uploaded here:
https://swrebellion.net/files/category/9-star-wars-mods/
 

Link to comment
Share on other sites

On 3/5/2023 at 12:12 PM, Hexdragon said:

My above statement is actually wrong.

Custom values like 0x05, 0x07 and 0x0A in MIssion's DWORD_09  behavior like binary flags, just as Metasharp remarked

Hence:
-A custom mission profile ( 
MIssion's DWORD_09 ) with a value like 0x05  ( 1 + 4  ) will match  SpecForces DWORD_29  with values 0x01 and 0x04
-A custom mission profile ( MIssion's DWORD_09 ) with a value like 0x07  ( 1 + 2+ 4  ) will match  SpecForces DWORD_29  with values 0x01 , 0x02 and 0x04
-A custom mission profile ( MIssion's DWORD_09 ) with a value like 0x0A  ( 2 + 8  ) will match  SpecForces DWORD_29  with values 0x02 and 0x08

On the other hand, custom value like 0x05 in SpecForces DWORD_29 will not match MIssion's DWORD_09 with values 0x01 and 0x04
That's, my former test result.

----


Further, a second ( and cleaner) solution for OP request is available:
In order to give assassination mission to Imperial Commandos, just modify that mission's entry in the second byte of MIssion's DWORD_09  

From 00 08 00 00 to 00 0C 00 00

That will match both :
SpecForces DWORD_29  = 00 08 00 00 ( Noghri Death Commandos ) 
And
SpecForces DWORD_29  = 00 04 00 00 ( Imperial Commandos ) 

----

Regards

p,s
The extra units mini-mod, referred in previous post, has been uploaded here:
https://swrebellion.net/files/category/9-star-wars-mods/
 

To be fair, i did a fresh reinstall last week cuz i messed up a lot of things. I asked my wife some help for all the cards. She is a graphist. I just came back tonight to recover the codes you send me last time and i fall on your new statement. 

 

Honnestly, it wasn't an ambition for me to learn chinese 😅
I think i'll ask you some day to give me some time. You look like a "king pin" with those codes and i don't really know where to start.

I'll try the new codes you just sent me. Hope it doesn't f*ck up again.

Btw, that's nice for assassination mission, but my next try will be with abduction mission.

I want to Change the purpose of the "Nogri" and make them something else.

 

I understand the purpose of a forum (help other people who have the same type of project than me), but i think at this point, my questions are very specifics. Are you part of the "Rebellion Discord"?

Link to comment
Share on other sites

First of all, il must thank you @Hexdragon for your time and knowledge. 

I worked on the cards for the last days and this is what i came up with.

The "noghri" and the "infiltator" are now "scientists/engeneers". It is all part of the mod i'm working on right now.

It will begin with only two buildable ships, one troop and the basics building.

They can be used to support characters who are able to do research or they can do it by themself but it will be faster with a minor character.

I was surprised and pleased to the see that the computer is able to use them.

image.png.a1cefad71845331a5e6b35ad22d28e02.png1724109336_Capturedcran2023-03-15234845.png.6b28b1ff44433c3732228f92a0a98ca6.png

The imperial commando and guerillas becames "Death troopers" and "Alliance special forces" from the Star Wars expanded universe.

They both can do assassination, abduction, sabotage, uprising and rescue. They are equally made. I don't want a side stronger thant the other.

 

I'll have more to show soon.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

Copyright (c) 1999-2022 by SWRebellion Community - All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Star Wars(TM) is a registered trademark of LucasFilm, Ltd. We are not affiliated with LucasFilm or Walt Disney. This is a fan site and online gaming community (non-profit). Powered by Invision Community

×
×
  • Create New...