Adding the Minor Race Personality in Race Info Screen?

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Adding the Minor Race Personality in Race Info Screen?

Post by Spocks-cuddly-tribble »

I think adding the personality (warlike, peaceful, pacifist, deceptive or spiritual) after name in Race Info would be a useful patch (hidden trait): :wink:

Race_Info.png
Race_Info.png (258.94 KiB) Viewed 5885 times
Editing the first contact popup is not needed IMHO:
First_Contact.png
First_Contact.png (86.88 KiB) Viewed 5885 times
Personality is a float value read from aiminor.wtf and stored as integer at 4081D1.
So call 405F00 Load_special_AIAgent_data_eax14h and reading [eax+4] is easy. [eax+8] would be the Explorer trait. :wink:

But where is the text strings for the personalities warlike, peaceful, pacifist, deceptive and spiritual (not trek.exe, aiminor.wtf or lexicon.dic)?
How hard would be editing wdf files & code of Race Info screen (I don't even know the file names)? Just replacing the name shouldn't require editing wdf.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Dec 07, 2023 6:56 am (I don't even know the file names)? Just replacing the name shouldn't require editing wdf.
correct should be all trek code changes

*d_rinfo.wdf called at 004C4548 is basic code area, but not seeing where race name string code is right now.
Spocks-cuddly-tribble wrote: Thu Dec 07, 2023 6:56 am warlike, peaceful, pacifist, deceptive or spiritual
I think these descriptions were imposed by Gowron? and are never listed in any file or trek. I think even UE uses a language string to display in UE.

But this project is similar to X, Y project. :wink:

needed
strings added to data area (warlike, peaceful, pacifist, deceptive and spiritual).
not sure if a jump table or what we would use to select correct personality string
new/borrowed wild card string "%s %s"
plus code space to use all above

edit; we might be able to use something like lexicon string id160 (but think code is a random selection?)
if personality = 0 use first string, if = 1 used 2nd string ect ...
Enormous|Juggernaut|Gigantic|Colossus|Leviathan|Tremendous
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Adding the Minor Race Personality in Race Info Screen?

Post by Spocks-cuddly-tribble »

thunderchero wrote: Thu Dec 07, 2023 10:55 am*d_rinfo.wdf called at 004C4548 is basic code area
Thank you, using this information I located:
4C2410   push  eax  // name string from race.rst
Easy to create a test patch, with strings from an asm pointer, replacing the race name.
For AI empires it could display the current AI agenda (same code location), but needs an exception for other player empires in MP....
thunderchero wrote: Thu Dec 07, 2023 10:55 amI think these descriptions were imposed by Gowron? and are never listed in any file or trek. I think even UE uses a language string to display in UE.
I can't see the personality code key in UE source code for aiminor.wtf: https://gitlab.com/stbotf/ultimate-edit ... minor.java :???:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Dec 07, 2023 2:22 pm I can't see the personality code key in UE source code for aiminor.wtf: https://gitlab.com/stbotf/ultimate-edit ... minor.java :???:
\ue\gui\stbof\emp\AiminorGUI.java
line 72?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Adding the Minor Race Personality in Race Info Screen?

Post by Spocks-cuddly-tribble »

Line 65... so "AiminorGUI.0" - "AiminorGUI.4" would be labels for personality values 0-4? And where is the language file with the data?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Thu Dec 07, 2023 3:04 pm Line 65... so "AiminorGUI.0" - "AiminorGUI.4" would be labels for personality values 0-4? And where is the language file with the data?
sorry I have not had much time to look at this, but helping when I can

https://gitlab.com/stbotf/ultimate-edit ... properties

line 509
AiminorGUI.0=Warlike
AiminorGUI.1=Peaceful
AiminorGUI.2=Pacifist
AiminorGUI.3=Deceptive
AiminorGUI.4=Spiritual
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Adding the Minor Race Personality in Race Info Screen?

Post by Spocks-cuddly-tribble »

Don't worry, I'm just not used to the UE java files. :???:

My first test code reads new asm strings via Personality*10 (using 50 unused bytes).


Final patch will check for AIAgents, and for other player empires just display race name in capitals (default -> MP-proof). :wink:

Else it will compose a new string:

- race name in capitals (default) +
- 5808A0 '%s - %s'
- minor Personality or current AI empire Agenda (usual letters)

If you have a better idea, let me know. :wink:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Dec 08, 2023 7:43 am If you have a better idea, let me know. :wink:
after helping me you might know how to add strings better than me.

as for font if it shares the string, I think all font will be the same (all capitals)

as for displaying "current AI empire Agenda" this would be interesting. not sure if this will give human player too much of an advantage.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Race Info Screen with Minor Race Personality and AI Agenda

Post by Spocks-cuddly-tribble »

Epic win. :cool:

Race_Info_Patch.png
Race_Info_Patch.png (312.12 KiB) Viewed 5694 times

Race_Info_Screen.patch
(2.29 KiB) Downloaded 81 times

ASM code:
► Show Spoiler

thunderchero wrote: Fri Dec 08, 2023 11:26 amas for displaying "current AI empire Agenda" this would be interesting. not sure if this will give human player too much of an advantage.
I'm not aware of any AI agenda which doesn't translate into 'hardcore Pakled', so no worry. Plus 'Jihad' still needs more research. :wink:
Last edited by Spocks-cuddly-tribble on Fri Dec 08, 2023 2:20 pm, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Dec 08, 2023 12:35 pm Epic win. :cool: Patch will be released after more tests. :smile:
thunderchero wrote: Fri Dec 08, 2023 11:26 amas for font if it shares the string, I think all font will be the same (all capitals)
No, I don't think so: :wink:
nice, look forward to patch.

btw I was thinking that was 28.fnt (no lower case in file)

the only thing I wonder about is using race list area some mods with edited majors/minors might have overlap
although all mods I checked had room for 50 bytes :wink:
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Adding the Minor Race Personality in Race Info Screen?

Post by Spocks-cuddly-tribble »

Patch released in above post. Multiplayer tests would be useful before use in public mods. :wink:
thunderchero wrote: Fri Dec 08, 2023 1:19 pmthe only thing I wonder about is using race list area some mods with edited majors/minors might have overlap
Post was edited and query removed since I optimised patch and relocated new strings to a safe area.

I just noticed the vanilla/ECM Bynars are Warlike by default. :shock:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7965
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Adding the Minor Race Personality in Race Info Screen?

Post by thunderchero »

Spocks-cuddly-tribble wrote: Fri Dec 08, 2023 2:23 pm Multiplayer tests would be useful before use in public mods. :wink:
Quick MP test, patch looks good :up:
(test done on patched vanilla)
if human player
human.jpg
human.jpg (469.75 KiB) Viewed 5645 times
if AI
ai.jpg
ai.jpg (485.79 KiB) Viewed 5645 times
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

AI Agenda Issues with Offensive/Defensive War

Post by Spocks-cuddly-tribble »

1.) AI wants to go to war vs a weaker empire but has no valid invade targets in medium range:

Bug/bias = defensive war -> should be offensive so the AI can get closer (defensive = new stations only in own territory)


2.) AI at the brink of annihilation vs a stronger enemy but also at war vs a weaker empire with valid invade targets:

Bug/bias = offensive war -> should be defensive (or even Jihad?)


3.) Jihad = open war vs a stronger but not more than twice as powerful (bug?) enemy who broke 3+ treaties

Trigger using unfinished features (second hidden attitude value) should be optimised/fixed, but leads to 'dumb' random ramming in combat. :???:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Race Info Screen with Minor Race Personality and AI Agenda

Post by Tethys »

Spocks-cuddly-tribble wrote: Fri Dec 08, 2023 12:35 pm Epic win. :cool:


Race_Info_Patch.png



Race_Info_Screen.patch


ASM code:
► Show Spoiler

thunderchero wrote: Fri Dec 08, 2023 11:26 amas for displaying "current AI empire Agenda" this would be interesting. not sure if this will give human player too much of an advantage.
I'm not aware of any AI agenda which doesn't translate into 'hardcore Pakled', so no worry. Plus 'Jihad' still needs more research. :wink:
Does the text update if their expansion agenda changes? If so, this is complete genius :shock:
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1961
Joined: Sun Apr 27, 2008 2:00 am

Re: Race Info Screen with Minor Race Personality and AI Agenda

Post by Spocks-cuddly-tribble »

Tethys wrote: Sun Dec 17, 2023 5:18 pmDoes the text update if their expansion agenda changes?
Yes, it's the agenda string used in 'map ai data type' E: viewtopic.php?p=34204#p34204
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
Post Reply

Return to “General Modding Information/Questions”