PDA

View Full Version : Modding Questions



cryptophore
17th Sep 2002, 07:31
I am in the middle of making a mod, and had some questions about some things I'm not sure I can do with startopia mods.

First, my mod, I call it 'InfeStation' is basically an 'aliens' inspired mission. The idea is to recover a station trashed by Skrashers/spawn, in a sector also overrun by spawn.

I was hoping to have new segments populated with destroyed structures, litter, and bodies, as players open them. Oh and a healthy dose of spawn...

Problem is, I dont see an easy way to place structures in a destroyed or even damaged state.
Ideally, I'd like to place things in 'unopened' segments in mission initialization, to be released as the player opens them -- in this case if undamaged structures were placed in closed sections with scrashers who would damage them as time goes on, the player would have incentive to expand quickly! But alas, apparently items cannot be placed in unopened sections either.

I'm having some trouble writing the script for placing things in a section as it is opened. Is there a good way to find the locations of a new section? At this point I'm just forcing expansion in a counterclockwise direction, so I can assume 'low x' coordinates are in the newer sections. Then I just scatter the released spawn between bio, mid, and sub decks. Its a hack but seems to work well enough.

Also, is there a 'allow all peeps' command to enable non-scripted traffic through the ports, or is 'disallow all peeps' a one-way command? I'd hoped to quarantine/unquarantine the players station as they cleared away skrashers.



I'd have been posting questions last week, but eidos forums email registration seems broken. I had to contact eidos webmaster' to get my registration confirmed by hand. Sheesh.

StarMapper
17th Sep 2002, 10:04
Originally posted by cryptophore

Problem is, I dont see an easy way to place structures in a destroyed or even damaged state.
Ideally, I'd like to place things in 'unopened' segments in mission initialization, to be released as the player opens them -- in this case if undamaged structures were placed in closed sections with scrashers who would damage them as time goes on, the player would have incentive to expand quickly! But alas, apparently items cannot be placed in unopened sections either.

Let's se. I've created one mission where I place 20 Black Cargo creates in the room lower to the first section you own. You start at section 8. I remember having trouble with it, but I think that the X coord is counted from your highest section you own. For example. You only own section 8. If you want to place items in section 7 the X coord should be higher then 16. If in section 9 it should be like 16*15 or something. If you download my Mission se AronaLoop.txt on how I fixed it.





Is there a good way to find the locations of a new section?



I remember that I figured this out as well. For one thing I needed it to place the creates.
And also to spawn sirens.
if
Array OwnMidDeck 7=1
then
Say "Siren"
set ownMid_7 1 ; or something to track
disable
end

This activates when you open section 7 middeck.

I remember having problem placing sirens also, but if you can place spawn that will not be a problem.
(Look at siren.txt)



I haven place room so I cant help you there.
You can find my mission at
http://w1.315.telia.com/~u31514223/Startopia/

cryptophore
17th Sep 2002, 14:06
I was thinking of using a test on the array like that, but it still leaves the problem of figuring out the 'x,y' coordinates in that deck, if they are relative to all the segments to the counter-clockwise that have been opened. thus yeah, it is just simpler to force the player to only open in the counter-clockwise direction, and assume 'x < 16' is going to be in the new segment.
Not the feel that I wanted, but it 'works'

StarMapper
17th Sep 2002, 21:13
I found this code in Arona.txt (My mission)
it is

:not_own_deck_9
if

arona_event_flag = 32
Array OwnSubDeck 9 = 0

then

set placeX (((own_under_8*16)+16)+6) ;X coord
;own_under_8 is I counter I increased when new segment is opened by the player on segment under 8
set arona_event_flag 40 ;My event counter
set arona_deck 9 ;Used for speech
disable

end

: own_deck_9
if

arona_event_flag = 32
Array OwnSubDeck 9 = 1

then

set arona_event_flag 33 ;My event counter

end

:not_own_deck_10
if

arona_event_flag = 33
Array OwnSubDeck 10 = 0

then

set placeX (((own_under_8*16)+32)+6)



.....for all sections up to 16




As explain above the player start at section 8.

If you start at 8 or 7 you get the area the player own together as a block of section. I the player starts at 1 or 16 and you allow the player to expand both way you'll get two areas. One in the beginning (i.e. 1-3) and one at the end (i.e. 14-16).

I hope you understand what I mean. English is my second language so it can be hard to explain.


You CAN do it!!

cryptophore
18th Sep 2002, 00:06
Yeah thanks, I understand waht you're explaining here, and I was basically going to do it that way anyway.

My primary objection is its going to be a lot of repeated code, as I'll need a new trigger block for each and every segment the player could open.

Glad I'm not going to try this for the entire torus.


Question is, what's the 'x' relative to, once you have the full torus opened up? segment 8?