.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Digital Eel > Weird Worlds: Return to Infinite Space > Scenarios and Mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old November 14th, 2007, 01:14 PM

mantari mantari is offline
Private
 
Join Date: May 2007
Posts: 38
Thanks: 0
Thanked 1 Time in 1 Post
mantari is on a distinguished road
Default Re: RANDOM GENERATOR PROTOTYPE

I moved the code into haven.ini so that it would automatically run at the start of each game. The individual items need a bit of reordering (for better readability), but it evaluates correctly.

Now, you may have 14 lifeforms. Also, instead of 5 of the 10 bits being set to 1, anywhere from 3 to 7 of the bits are set to 1. (There is a highly rare chance that only 2 bits could be set, due to the previously mentioned 'ITEM random life' bug.) Most of the time, 4-6 of the 10 'random' bits will be set. [NOTE: Now that I think about it, I see a way that I could go to 7 random bits, and have anywhere from 0 to 7 bits set, but I guess that'll have to be another version, if I attempt it.]

The code does call out some lifeforms (lf_eel, lf_foureyed) that are not in the default game, but that can be changed (from game.ini and inside of the haven.ini code):
lf_eel lf_foureyed lf_lummox lf_megamoeba lf_serpvine lf_plasworm lf_crysfish lf_drmsnake lf_threep lf_bloater lf_piranbee lf_windbag lf_lookfrog lf_ppleater

Here is the new haven.ini code that'll generate some random numbers at the start of each game:
Code:
FLAG always

STAR 0
FLAG existing
PLNT hope
ITEM wp_beamlasr
UVAR randready 0
END STAR

STAR 1
FLAG existing
PLNT hope
ITEM wp_gausscan
END STAR

STAR 2
FLAG existing
PLNT hope
ITEM wp_missfusr
END STAR

CONDITION 0
TYPE homeworld
STR0 terran
END CONDITION

CONDITION 1
TYPE uvar
STR0 randready
STR1 0
END CONDITION

CONDITION 2
TYPE haveitem
STR0 lf_lookfrog
END CONDITION

CONDITION 3
TYPE haveitem
STR0 lf_eel
END CONDITION

CONDITION 4
TYPE haveitem
STR0 lf_foureyed
END CONDITION

CONDITION 5
TYPE haveitem
STR0 lf_lummox
END CONDITION

CONDITION 6
TYPE haveitem
STR0 lf_serpvine
END CONDITION

CONDITION 7
TYPE haveitem
STR0 lf_plasworm
END CONDITION

CONDITION 8
TYPE haveitem
STR0 lf_threep
END CONDITION

CONDITION 9
TYPE haveitem
STR0 lf_bloater
END CONDITION

CONDITION 10
TYPE haveitem
STR0 lf_piranbee
END CONDITION

CONDITION 11
TYPE haveitem
STR0 lf_windbag
END CONDITION

CONDITION 12
TYPE haveitem
STR0 lf_megamoeba
END CONDITION

CONDITION 13
TYPE haveitem
STR0 lf_drmsnake
END CONDITION

CONDITION 14
TYPE haveitem
STR0 lf_crysfish
END CONDITION

CONDITION 15
TYPE haveitem
STR0 lf_ppleater
END CONDITION

PAGE 0
REQ0 0
REQ1 1
ITEM random life
ITEM random life
ITEM random life
ITEM random life
ITEM random life
ITEM random life
ITEM random life
SVAR randA 0
SVAR randB 0
SVAR randC 0
SVAR randD 0
SVAR randE 0
SVAR randF 0
SVAR randG 0
SVAR randH 0
SVAR randI 0
SVAR randJ 0
SVAR rand4 3
SVAR rand5 0
SVAR rand8 0
SVAR randready 1
END PAGE

PAGE 1
REQ0 0
REQ1 15
REMV lf_ppleater
END PAGE

PAGE 2
REQ0 0
REQ1 12
REMV lf_megamoeba
END PAGE

PAGE 3
REQ0 0
REQ1 2
REMV lf_lookfrog
SVAR randA 1
INCV rand5 1
END PAGE

PAGE 4
REQ0 0
REQ1 3
REMV lf_eel
SVAR randB 1
INCV rand5 1
END PAGE

PAGE 5
REQ0 0
REQ1 4
REMV lf_foureyed
SVAR randC 1
INCV rand5 1
INCV rand8 1
END PAGE

PAGE 6
REQ0 0
REQ1 5
REMV lf_lummox
SVAR randD 1
INCV rand5 1
INCV rand8 2
END PAGE

PAGE 7
REQ0 0
REQ1 6
REMV lf_serpvine
SVAR randE 1
INCV rand5 1
INCV rand8 4
END PAGE

PAGE 8
REQ0 0
REQ1 7
REMV lf_plasworm
SVAR randF 1
END PAGE

PAGE 9
REQ0 0
REQ1 8
REMV lf_threep
SVAR randG 1
SVAR rand4 2
END PAGE

PAGE 10
REQ0 0
REQ1 9
REMV lf_bloater
SVAR randH 1
SVAR rand4 2
END PAGE

PAGE 11
REQ0 0
REQ1 10
REMV lf_piranbee
SVAR randI 1
SVAR rand4 1
END PAGE

PAGE 12
REQ0 0
REQ1 11
REMV lf_windbag
SVAR randJ 1
SVAR rand4 0
END PAGE

PAGE 13
REQ0 0
REQ1 13
REMV lf_drmsnake
END PAGE

PAGE 14
REQ0 0
REQ1 14
REMV lf_crysfish
END PAGE

PAGE 15
REQ0 0
DISP 1
ACTN popup endquest
TEXT RANDOM 0-3: <uvar=rand4><BR>RANDOM 0-4:
<uvar=rand5><BR>RANDOM 0-7: <uvar=rand8><BR>BITMAP:
<uvar=randA><uvar=randB><uvar=randC><uvar=randD>
<uvar=randE><uvar=randF><uvar=randG><uvar=randH>
<uvar=randI><uvar=randJ>
END PAGE

 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.