EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
[Utility] Random Ship Type (for scripters)
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
AalaarDB





Joined: 29 Jan 2004
Posts: 2279 on topic

Thank you for registering your game
modified
PostPosted: Sat, 3. Dec 05, 06:29    Post subject: [Utility] Random Ship Type (for scripters) Reply with quote Print

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
Back to top
View user's profile Send private message Send e-mail
nuclear_eclipse



MEDALMEDALMEDAL

Joined: 02 Sep 2004
Posts: 1128 on topic
Location: /dev/nuke
Thank you for registering your game
PostPosted: Sat, 3. Dec 05, 16:56    Post subject: Reply with quote Print

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! Cool

Thank you aalaardb!


_________________
blog
Back to top
View user's profile Send private message Visit poster's website
Tritous





Joined: 15 Jan 2005
Posts: 879 on topic

Thank you for registering your game
PostPosted: Thu, 26. Jan 06, 01:50    Post subject: hmm Reply with quote Print

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 Oops


_________________
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 Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Mon, 25. Jun 18, 04:24

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.04677 seconds, sql queries = 17