[Utility] Random Ship Type (for scripters)

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Posts: 2279
Joined: Thu, 29. Jan 04, 09:19

[Utility] Random Ship Type (for scripters)

Post by AalaarDB » Sat, 3. Dec 05, 06:29

For a script I'm making I needed just about every type of ship there is, and randomly to boot. This was a small problem in X2, but with tankers and vanguards it's become much worse. I couldn't find a way to select different variations on ships (like for instance, changing sub ware type). So I turned off my brain and slogged through selecting them one by one. Forgive me if I missed a better way to do this. After a few hours my hands are tired but it's done. I post it here so if you ever need to do the same your hands won't hurt afterwards! Ships are broken down into category, then selected based on a weighted random number. If you edit the weights, or anything really, you must rename the scripts.

Random Shiptype Generator
RandomShiptypes.zip Mirror

Sister library: Random WareType Generator
Last edited by AalaarDB on Sun, 1. Jan 06, 06:41, edited 3 times in total.

User avatar
Posts: 1128
Joined: Thu, 2. Sep 04, 01:54

Post by nuclear_eclipse » Sat, 3. Dec 05, 16:56

Your efforts will not go unappreciated. I will be hanging on to this for use in the near future. Much thanks and gratitude are being sent in your general direction.

Fear not, for yee shall be rewarded! 8)

Thank you aalaardb!

Posts: 879
Joined: Sat, 15. Jan 05, 18:20


Post by Tritous » Thu, 26. Jan 06, 01:50

sounds good. I did actually come up with a good algorithm for working such out, and gave a copy to cycrow. I don't know if it is workable though, knowing me it might not be as I know nothing of the script engine really and it's just a generic algorithm, but who knows :S
Give a man a fire, he'll stay warm for a day
Set a man on fire, he'll stay warm for the rest of his life ;)

Post Reply

Return to “X³: Reunion - Scripts and Modding”