Monster Editing Info

Monster Editing Info; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7850
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Monster Editing Info

Post by thunderchero »

rxz1000 wrote:My EDO Guardian ID in UE 257 (the Borg monster starts at 252).
you have too many ships in your ship list, max with monsters is 255 (or FF) code for monster id's only has room for 2 bytes.

I am shocked UE allowed this.
User avatar
rxz1000
Cadet 2nd Year
Cadet 2nd Year
Posts: 7
Joined: Sun Sep 08, 2013 1:17 pm

Re: Monster Editing Info

Post by rxz1000 »

Thanks Thuderchero,

I misunderstood the limit. I thought the borg had to start before 255. I will knock out a few ship upgrades to see if the problem gets sorted.

UE hasn't thrown any wobblers for the large number. Even a file integrity check didn't complain.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7850
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Monster Editing Info

Post by thunderchero »

rxz1000 wrote:UE hasn't thrown any wobblers for the large number. Even a file integrity check didn't complain.
TBH i don't think it has ever been tested. I just checked and individual monsters have 4 bytes of space, only some of the Alien Starting ID are 2 bytes

check at 0x0004F1B2 with edo set to 257 it should read 01 01
User avatar
rxz1000
Cadet 2nd Year
Cadet 2nd Year
Posts: 7
Joined: Sun Sep 08, 2013 1:17 pm

Re: Monster Editing Info

Post by rxz1000 »

Thanks Thunderchero for your assistance.

I have checked the Trek.exe and at 4F1B2 it indeed is 01 01.

It seems to be the guardian (only monster thus encountered) that is causing the problem as other combats (not against monsters) seem to be ok.

By the way, when I get a crash at the end of combat I don't get a crash log. I get an individual .tac file which I can't read.
User avatar
Kurn
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 93
Joined: Thu Aug 12, 2010 2:00 am
Location: Germany

Re: Monster Map Movements

Post by Kurn »

Spocks-cuddly-tribble wrote: Tue Mar 06, 2012 3:09 pm
:arrow: Avoid AI Systems Fix for Monster Programs 2-4

This should help preventing games ruined due to monster assaults on the AI empires (especially borg).

Code: Select all

trek.exe at 0x325DB new code 0xF bytes:

6B C0 65 8B 15 C8 36 5A 00 80 7C C2 04 01 90

-asm code:
004331DB     6BC0 65         IMUL EAX, EAX ,65 // system ID
004331DE     8B15 C8365A00   MOV EDX, [5A36C8]  //address systInfo
004331E4     807CC2 04 01    CMP BYTE [EDX+EAX*8+4], 1 // AI check
004331E9     90              NOP
I don't know why but this isn't working in my mod. I (Klingons) got an offer from the Federation to be allies because the BORG are a big threat. Then I looked what's happening and I found a cube is attacking one of their systems.

I edited this hex code years ago, but now it's the first time the Borg attacking AI.
User avatar
Kurn
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 93
Joined: Thu Aug 12, 2010 2:00 am
Location: Germany

Re: Monster Editing Info

Post by Kurn »

2 weeks ago I was modifying my personal mod with the following hex code. Could this be the reason for my problem?
Spocks-cuddly-tribble wrote: Thu Apr 21, 2016 5:34 pm Alternatively, here is a simple hex code to disable system-specific random events, but keeping the Initial test for rebellions (see @1.2).

It's mistakenly part of the random events. The code for penalties for low morale is flawed:

viewtopic.php?f=242&t=1082#p18755

Code: Select all

trek.exe at 0x04B5B7 change 7E 27 to -> 90 90

044C1B7   jle   short select_event -> nop
You can disable this for AI, see above. :wink:
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7850
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Monster Editing Info

Post by thunderchero »

I gave up editing monster/randoms a long time ago, most of the time it just ruins the games So I just turn them off.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Monster Map Movements

Post by Spocks-cuddly-tribble »

Kurn wrote: Tue Oct 27, 2020 11:18 pm
Spocks-cuddly-tribble wrote: Tue Mar 06, 2012 3:09 pm :arrow: Avoid AI Systems Fix for Monster Programs 2-4
I don't know why but this isn't working in my mod. I (Klingons) got an offer from the Federation to be allies because the BORG are a big threat. Then I looked what's happening and I found a cube is attacking one of their systems.

I edited this hex code years ago, but now it's the first time the Borg attacking AI.
This fix is not failsafe. When testing the monster save game data fix, using F6, F11 and repeated reloading of saved games, it failed for me as well. viewtopic.php?p=51581#p51581

Not sure what exactly caused the failure, but keeping the fix doesn't seem to break anything either. :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
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Multiple Edo Gods (hacky way)

Post by Tethys »

I found a hacky way to have multiple Edo gods without having to create any code. But it requires moving the minor races you want to have the Edo god to the top of the minor race list.

For example, in GALM I have just moved the Bajorans (minor race ID 18) and Cardassians (ID 19) to new positions with new ID's (Bajorans > 05, Cardassians > 06). Race introductions would need to be adjusted but not impossible, and seemingly easier work at the moment than fabricating custom code which may (or may not) work. This is proven method, as I just tested it.

0x070714 > 06 0F 8F
06 = Race ID
0F = opcode
8F = jump if greater than (06 Cardassian)
0x050b1c > 06 0F 8F
06 = Race ID
0F = opcode
8F = jump if greater than (06 Cardassian)
So if you want to have 4 races with the Edo god, 06 becomes 08 and the 2 races shall be moved near the top of the list (just after major races)

Ladies and gentlemen, say hello to Nor Class Stations in Bajor and Cardassia :mrgreen:
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: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Multiple Edo Gods (hacky way)

Post by Spocks-cuddly-tribble »

Tethys wrote: Thu Oct 05, 2023 4:38 pmsay hello to Nor Class Stations in Bajor and Cardassia :mrgreen:
Sorry to spoil the fun, but there is still much work to do.

There is many hardcoded checks for EDO in bitmasks and special pointer for EDO alienInfo entry to check relationship of others to the EDO in combat.
One of my fixes even adds another special EDO pointer: viewtopic.php?p=29166#p29166

So you'd have to switch all codes to dynamic calculations via race ID (bitmask and alienInfo). One example of many:
00430620         test    byte ptr ds:dead_races_BitMask_1+2, 4  // check if EDO race still alive for race ID 18 / 12h

00430653         mov     eax, offset AlienInfo_EDO_entry  // get AlienInfo entry for relationship test
EDIT: A solution for you the check the minor race ID by loading systInfo :up:
5B5560 TC_sector_lst_entry
But there is at least six xrefs to 5A2490 AlienInfo_EDO_entry, so you're going to have a lot of fun with this...
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: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Monster Editing Info

Post by Tethys »

I was going by what DCER said in a previous post that "all races will get the guardian, and each will consider the system inhabitants as the Edo for that God" .... ie "will consider you an ally, but the Talarian one will not"

I like the idea of keeping the bug "Edo God auto hail bugfix" as it kinda makes one situation where you can "comandeer" the starbase and use it. It's like the Cardassians just abandon their stations or something ;)

I mean, since we can't give Starbases to minors (yet) ?
Last edited by Tethys on Fri Oct 06, 2023 7:16 pm, edited 1 time in total.
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: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Monster Editing Info

Post by Spocks-cuddly-tribble »

DCER talks about membership treaties only (also wrong, since it works for occupiers too):
DCER wrote: Mon Aug 11, 2008 5:15 amIf you sign a membership treaty, the alien will consider you an ally just like before with the Edo set. (...) Each guardian is tied to the race it protects, meaning if you sign membership with the Edo, their guardian will consider you an ally, but the Talarian one won't.
For free minors it will still check whether the EDO are alive and relationship of other ships in combat to the EDO for all EDO gods in game.
Tethys wrote: Fri Oct 06, 2023 6:21 amI like the idea of keeping the bug "Edo God auto hail bugfix" as it kinda makes one situation where you can "comandeer" the starbase and use it. It's like the Cardassians just abandon their stations or something ;)
Even if you want to use this glitch as a feature in your mod, you still need to handle the GOD codes for free minor races (EDO bitmask & alienInfo).
Otherwise the EDO God might crash the game in combat IF minor race ID 12h is dead or not in game AND the God's minor race is not part of an empire.
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: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Monster Editing Info

Post by Tethys »

I understand now. Once the Edo are wiped out, all GODs are going to throw errors. Correct? I will need to find and remove that if possible.

OT I got some alternate dil icons I am about to release, just need to find the post.
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: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: Monster Editing Info

Post by Spocks-cuddly-tribble »

Tethys wrote: Fri Oct 06, 2023 1:05 pmI will need to find and remove that if possible.
Removing all codes (or just the JZ's) and my "Edo God auto hail bugfix" should work for your retarded/cheesable EDO God stations: :wink:
00430620         test    byte ptr ds:dead_races_BitMask_1+2, 4
00430627         jz      short read_off_for_edo_test

0047131B         test    byte ptr ds:dead_races_BitMask_1+2, 4
00471322         jz      EDO_alive

004773FC         test    byte ptr ds:dead_races_BitMask_1+2, 4 ; case 0x6
00477403         jz      short load_edo_dip_info_

005529A3         test    byte ptr ds:dead_races_BitMask_1+2, 4
005529AA         jz      loc_552A1A

00552AB1         test    byte ptr ds:dead_races_BitMask_1+2, 4
00552AB8         jz      loc_552B95

00552E28         test    byte ptr ds:dead_races_BitMask_1+2, 4
00552E2F         jz      loc_552E9F
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: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Monster Editing Info

Post by Tethys »

Thank you for this consolidated info. I will get to work with this. Empok Nor has weapons and will fire if fired upon as it is now. And when you colonize Trivas, the station becomes your protector (no more combat notifications for player) :)

So I imagine this will help alleviate any potential crashing for inhabitant check.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “Monster Editing Info”