Random Events

Random Events; support/discussion/questions

Moderator: thunderchero

User avatar
jonesie85two
Lieutenant-Commander
Lieutenant-Commander
Posts: 201
Joined: Sat Apr 26, 2008 2:00 am

Re: Random Events

Post by jonesie85two »

Ok, thank you.
User avatar
Goth47
Cadet 2nd Year
Cadet 2nd Year
Posts: 7
Joined: Tue Apr 07, 2015 10:04 am

Re: Random Events

Post by Goth47 »

Thanks so much for this topic. Its been a huge help
User avatar
Kurn
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 93
Joined: Thu Aug 12, 2010 2:00 am
Location: Germany

Re: "Artifacts" Display fix for Special Systems

Post by Kurn »

Spocks-cuddly-tribble wrote: Mon May 16, 2016 8:23 am Drone and special systems were supposed to have "Artifacts" (loc_4FD30F). Should be displayed when moving mouse to terraformed planet instead of "terraform done/required"

Code: Select all

0xFC732 change E4 -> B6

4FD331  ^E9 B6FDFFFF   JMP 4FD0EC
So determining special systems becomes a bit easier when using 'New System Events' 8 & 9 (see above). :wink:
starfleet wrote: Tue Jul 15, 2014 11:58 am I think these Lexicon entries are also a random event:

39 => Artifacts have been discovered in the %1 system which use advanced technology. Scientists have acquired %d2 teraquads of research data from studying the artifacts.
40 => ALIEN ARTIFACTS DISCOVERED
That would be a really cool easter egg: Find the minosian drone, destroy it, colonize the system and get the knowledge of the Minosians!
User avatar
Mudpuppy630511
Ensign
Ensign
Posts: 20
Joined: Wed Nov 20, 2019 12:38 pm

Re: Random Events

Post by Mudpuppy630511 »

What would those numbers look like if I want to, say, monsters and random events not show up until around turn #160 (when playing from the beginning), or turn 30 (when playing advanced)?
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1885
Joined: Sun Apr 27, 2008 2:00 am

Re: Random Events

Post by Spocks-cuddly-tribble »

It's not that easy because random events (by default) affect all five empires, not only the player (or the players in MP).

So you'd need to write a code calculating the average of the starting levels instead of the difficulty level.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Final Run
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 66
Joined: Mon Apr 13, 2015 3:34 pm

Re: Example: Lowering system-specific random event frequency

Post by Final Run »

Spocks-cuddly-tribble wrote: Sun Apr 17, 2016 9:43 am Example disable Super Nova (See @1.4)

44C014 switch/jump table: (case / 4byte address of code sequence)
goto asm 44C014 +4*0 (bitmask) -> copy 4 byte
goto asm 44C014 +4*3 (Super Nova) -> paste 4 byte from bitmask

Code: Select all

trek.exe at 0x04B420 change E7 C2 44 00 to -> 1B C2 44 00
Please excuse my ignorance, but how and where would I edit these codes? Through HxD?

I've thought about disabling nova's for awhile now, not only for mods I've been working on but also for preferable experience (for me anyway) in single player.

And while I'm at it, I thought I might mention ECM's added tactical options and the possibility of lifting the command restriction. Thunderchero informed me earlier that the cloak command could be borrowed by other ships :shock: -- as you might imagine I was very sad to hear that. Regardless, might it might be fun to play with in a offline game at least. viewtopic.php?f=209&t=1998&p=28508#p28508
Spocks-cuddly-tribble wrote: Sun May 22, 2011 5:52 am If you want to disable the command ship solo-targeting restriction in one of your mods, just replace 75 with EB in my replacement code at the position below:

Code: Select all

trek.exe at 0xA5B28  change 75 to  EB
4A6728     75 10               JNZ SHORT 4A673A
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7853
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Random Events

Post by thunderchero »

here is the 2 patches above
disable Super Nova.patch
(146 Bytes) Downloaded 55 times
disable solo-targeting restriction.patch
(192 Bytes) Downloaded 55 times
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1885
Joined: Sun Apr 27, 2008 2:00 am

Re: Example: Lowering system-specific random event frequency

Post by Spocks-cuddly-tribble »

Final Run wrote: Sun May 21, 2023 5:56 pmThunderchero informed me earlier that the cloak command could be borrowed by other ships :shock: -- as you might imagine I was very sad to hear that.
This shouldn't pose much of an issue since hardly anyone knows about this and even fewer are able to handle this interface bug.

But re-cloak is very risky and rather pointless (default = evade with weapons and shields disabled).

Exception is usage for already cloaked ships instead of 'hold' to change the position (counter measure for the one-uncloaked-ship exploit).

Note that just adding the 'hold' command is a big change and MP folks might not like changing the one-uncloaked-ship tactic. :!:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Final Run
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 66
Joined: Mon Apr 13, 2015 3:34 pm

Re: Random Events

Post by Final Run »

Spocks-cuddly-tribble wrote: Sun May 21, 2023 9:13 pm .
thunderchero wrote: Sun May 21, 2023 6:38 pm here is the 2 patches above
disable Super Nova.patch
disable solo-targeting restriction.patch

Many thanks for the patches and information. It seems I have a bit to think about now. :grin:

EDIT: Geez,I just realized how simple it was-- just put in the header and copy-paste the code in notepad. Feeling pretty silly now :razz:
Attachments
notepad.png
notepad.png (12.6 KiB) Viewed 1090 times
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2392
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Modifying System Events

Post by Tethys »

Spocks-cuddly-tribble wrote: Mon Apr 25, 2016 4:01 pm Here are some new options to play with: :smile:
...

More important is the probability per system to become special:

Code: Select all

00451B01 cmp edx, 4

4 divided by the random divisor 200 = default 2% per system (percentage = value/2) i.e. average 1 of 50 systems

A map featuring about 500 stars and a probability of 5% per star (for check *2 = 0xA) has about 25 special systems. So a limit of 100(0x64) should be fine.
I had some time today to play with cases 8 and 9. I colonized 2 systems (one with combat drone, other was empty with "Artifacts")

I have added case 8 and 9, for case 8 I used minor race ships count 02 starting at minor race Species 8472 (E2 in shiplist, 2 ships to choose)

For case 9 I used entry 05 in the ship list (GALM Dominion Jem'Hadar Attack Ship).

I colonized both systems, but I did not get any "refloating" of ships in either system. Is there perhaps some chancing factor? I reloaded the saves several times to the same results (2 different saves). I am thinking there is an undisclosed chance variable? I thought the above code selected the chance of the system itself to become Artifacted. Not for cases additional? My code is changed from 04 > 10 at above location. No crashes to report so far.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
Post Reply

Return to “Random Events”