Help!
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
This stuff is very confusing, unfortunately, because the code for controlling ships "evolved" over time.Burzmali wrote:Hey george, any chance you can enlighten us on this one? That or post would the codes mean for the "objCommunicate" function correlate to.
When orders are given to ships (with shpOrder... ) the ship will try to execute the order until the order is complete (or cannot be completed) or the order is cancelled.
If an ship gets a second order while it's still trying to finish another order, it puts the second order on a list and doesn't execute it until the first order is finished (same with third and fourth orders).
In this case, what's happening (I think) is that the ship is currently ordered to escort the player and you've given it an order to escort something else.
One way to fix it is to cancel the first order (to escort the player) before giving the second order. Use:
(shpCancelOrders ship)
Good luck!
p.s.: While executing an order, a ship can be in different states. For example, imagine that an auton is ordered to escort the player. While escorting the player, it might still want to attack an enemy ship. This is not done as a separate order. Instead, it is a state within the order.
Another way to say it:
Each enemy ship has a queue of orders to complete.
While executing each order, a ship runs through a state machine depending on its environment. (e.g., an auton might start in state "follow player" and keep following the player. But if an enemy ship appears, the auton switches to "attack target" state. If the enemy ship is destroyed or the player moves beyond a certain range, the auton goes back to the "follow player" state.
The states and state transitions are different for each order (and for each "controller").
Given the above:
(shpOrder... ) and (shpCancelOrders) manipulate the queue of orders for an enemy ship.
(objCommunicate ...) can sometimes change the state of a ship in the state machine. For example, autons can be told to change state to the "attack target" state.
Unfortunately, there is no state that would cause an auton to escort another target while still inside the order to escort the player (a recursive escort).
That's why you have to do it through the orders queue.
Anyway, I'm sure this is more info than you're all looking for--hopefully programmers in the audience (I'm looking at you Burzmali!) will appreciate it.
Well, to clear it up for evilbob the code should be this then:
AI programming is nothing to sneer at. Even in a game like this, I am sure getting the AI to act even remotely intelligent is a pain. By the way, any chance that you will be opening the AI code up to modding in the next release 
Code: Select all
<Communications>
<Message name="Escort target" key="E">
(if (objGetTarget gSender)
(block Nil
(shpCancelOrders gSource)
(shpOrderEscort gSource (objGetTarget gSender))
(objSendMessage gSender gSource "Command received. Escorting target")
))
</Message>
</Communications>

I figured it would be something to do with "lingering orders".george moromisato wrote: If an ship gets a second order while it's still trying to finish another order, it puts the second order on a list and doesn't execute it until the first order is finished (same with third and fourth orders)...
...(shpCancelOrders ship)
Good luck!
Thanks indeed, George!
EDIT: Splendid, it works, although the player loses that auton. (I fixed that though, code follows)
Code: Select all
<Communications>
<Message name="Escort target" key="E">
(if (objGetTarget gSender)
(block Nil
(shpCancelOrders gSource)
(shpOrderEscort gSource (objGetTarget gSender))
(objSendMessage gSender gSource "Command received. Escorting target")
))
</Message>
<Message name="Return to formation" key="R">
(if (objGetTarget gSender)
(block Nil
(shpCancelOrders gSource)
(shpOrderEscort gSource gSender)
(objSendMessage gSender gSource "Command received. Returning to formation")
))
</Message>
</Communications>
Yes, this topic is back, I have another problem!
anyway, I'm making my own version of the Agricultural staion mission, but I get a game crash when I start the mission (between undocking and the enemy ships appearing)
thats the mission code and the !entity things.
It goes in my big mod, so Its not a lack of the "transcendence extension" line ( I doubt it would cause that error either)
anyway, I'm making my own version of the Agricultural staion mission, but I get a game crash when I start the mission (between undocking and the enemy ships appearing)
Code: Select all
<!ENTITY stdistresstalon "0xD2020267">
<!ENTITY etdistress1 "0xD2020268">
<!ENTITY etdistress2 "0xD2020269">
<!ENTITY etdistress3 "0xD2020270">
<EncounterTables>
<Group UNID="&etdistress1;">
<Ship class="&scCorsair-II;" count="1d2" orders="attack" sovereign="&svPirates;"/>
<Table>
<Ship chance="75" count="15" class="&scCorsair;" orders="attack" sovereign="&svPirates;"/>
<Ship chance="25" count="3d5" class="&scViking;" orders="attack" sovereign="&svPirates;"/>
</Table>
</Group>
<Group UNID="&etdistress2;">
<Ship class="&scDrake;" count="1d2" orders="attack" sovereign="&svPirates;"/>
<Table>
<Ship chance="75" count="2d7" class="&scViking;" orders="attack" sovereign="&svPirates;"/>
<Ship chance="25" count="2d5" class="&scCorsair-II;" orders="attack" sovereign="&svPirates;"/>
</Table>
</Group>
<Group UNID="&etdistress3;">
<Ship class="&scDrake;" count="1d2" orders="attack" sovereign="&svPirates;"/>
<Table>
<Ship chance="75" count="2d3" class="&scDrake;" orders="attack" sovereign="&svPirates;"/>
<Ship chance="25" count="2d5" class="&scCorsair-II;" orders="attack" sovereign="&svPirates;"/>
</Table>
</Group>
</EncounterTables>
<!-- Agricultural Station -->
<StationType UNID="&stdistresstalon;"
name= "Talon Outpost"
sovereign= "&svTalon;"
dockScreen= "Main"
abandonedScreen= "&dsAbandonedStation;"
dockingPorts= "8"
canAttack= "true"
noBlacklist= "true"
multiHull= "true"
armorID= "&itDuralloyArmor;"
maxHitPoints= "350"
hitPoints= "350"
repairRate= "1"
ejectaType= "&vtWreckEjecta;"
attributes= "friendly,populated,primary"
levelFrequency= "uuuuu ----- ------ ----- -----"
locationCriteria= "+LifeZone,-OuterSystem,-asteroids"
noArticle= "true"
>
<Names>Talon Outpost Distess beta; Talon Outpost Distess alpha; Talon Outpost Distess gamma; Talon Outpost Distess delta; Talon Outpost Distess omega;</Names>
<Image imageID="&rsTICoutpost;" imageX="0" imageY="0" imageWidth="128" imageHeight="128" imageFrameCount="0" imageTicksPerFrame="0"/>
<Ships>
<Table count="1d3">
<Ship chance="50" count="1" class="&scEI100;" orders="gate"/>
<Ship chance="50" count="1" class="&TICfighterA;" orders="guard"/>
</Table>
</Ships>
<Items>
<RandomItem count="3"
criteria= "* +TIC"
level= "4"
levelCurve= "1"
/>
<RandomItem count="5"
criteria= "* -Illegal; -Alien; -Specialty"
level= "4"
levelCurve= "2"
/>
</Items>
<InitialData>
<State> "start" </State>
<Declined> 0 </Declined>
<Wave> 0 </Wave>
</InitialData>
<StaticData>
<Reward> 15000 </Reward>
<WaveData>
(
("wave 1"
"\"The first wave will be mostly composed of medium to heavy gunships, but it should be nothing for now...\""
(lambda (station)
(block Nil
(sysAddEncounterEventAtDist 0 station &etdistress1; 300)
(sysAddEncounterEventAtDist 30 station &etdistress1; 300)
)
)
)
("wave 2"
"\"If the pirates are following their usual strategy, the next wave should be a little larger, and may be led by a drake. Watch out.\""
(lambda (station)
(block Nil
(sysAddEncounterEventAtDist 0 station &etdistress2; 300)
(sysAddEncounterEventAtDist 90 station &etdistress2; 300)
)
)
)
("wave 3"
"\"OK, this is it. We've detected several Drakes. If you can destroy them, then it could be a blow from which the pirates will never recover.\""
(lambda (station)
(block Nil
(sysAddEncounterEventAtDist 0 station &etdistress3; 300)
(sysAddEncounterEventAtDist 300 station &etdistress3; 300)
)
)
)
)
</WaveData>
</StaticData>
<Events>
<OnTimer>
(block Nil
; Create the encounter
(apply
(eval
(item
(item (objGetStaticData gSource "WaveData") (objGetData gSource "Wave"))
2
)
)
gSource
Nil
)
; Mark WaveReady so that we know that we've already created the encounter
(objSetData gSource "WaveReady" True)
)
</OnTimer>
<OnDestroy>
(block (looter pirate)
(intTICOnDestroy)
(if (eq (objGetData gSource "State") "in-progress")
(block Nil
; Create a transport to come and loot the remains
(setq looter
(sysCreateShip
&scEI100M;
(sysVectorPolarOffset gSource (random 0 359) 25)
&svPirates;
)
)
(shpOrderLoot looter gSource)
(shpOrderGate looter)
; Assign some of the pirates to defend the transports and the
; rest to attack the player
(enum (sysFindObject gSource "sAE N:300;") pirate
(block (class)
(setq class (shpGetClass pirate))
(if (or (eq class &scCorsair;)
(eq class &scViking;)
(eq class &scCorsair-II;))
(block Nil
(shpCancelOrders pirate)
(if (eq (random 1 4) 1)
(shpOrderEscort pirate looter)
(shpOrderAttack pirate gPlayerShip)
)
)
)
)
)
; Send out more pirates to attack the player
(sysAddEncounterEventAtDist 0 gPlayerShip &etdistress2; 50)
)
)
)
</OnDestroy>
</Events>
<DockScreens>
<Main
name= "=(objGetName gSource)"
backgroundID= "&rsShipInterior;"
>
<InitialPane>
(if (eq (objGetData gSource "State") "in-progress")
"MissionStatus"
"Default"
)
</InitialPane>
<Panes>
<Default
desc= "You docked at a small outpost station of the Talon Industrial Corporation. An omnilift provides access to various points around the station. There appears to be some sort of situation...">
<Actions>
<Action name="Communication centre" imageID="&rsItemListScreen;" imageIndex="1" key="M">
(if (eq (objGetData gSource "State") "done")
(scrShowPane gScreen "MissionDone")
(scrShowPane gScreen "MeetingHall")
)
</Action>
<Action name="Techmarket" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="T">
<ShowPane pane="CommoditiesExchange"/>
</Action>
<Action name="Dock Services" key="D">
<ShowPane pane="DockServices"/>
</Action>
<Action name="Undock" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="U">
<Exit/>
</Action>
</Actions>
</Default>
<MissionDone
desc= "The centre buzzes with life, and everyone nods to you in aknowledgement when you enter.">
<Actions>
<Action name="Done" imageID="&rsItemListScreen;" imageIndex="1" default="1" cancel="1" key="D">
<ShowPane pane="Default"/>
</Action>
</Actions>
</MissionDone>
<MeetingHall>
<Initialize>
(switch
; If the player hasn't accepted the mission yet...
(eq (objGetData gSource "State") "start")
(block Nil
(if (eq (objGetData gSource "Declined") 0)
; If this is the first time the player is here...
(scrSetDesc gScreen (cat
"As you enter the communications centre, you see about a dozen people talking excitedly over a scanner display. "
"One of them approaches you: \"Welcome to out station, "
"Captain. Look, I'll get right to the point: "
"The station is going to be attacked by a pirate battle force is coming"
"to attack the station. Our weapons are down, and the nearest A-2 is to far away to help."
"We saw your ship come in, and frankly, we thought that you might be able to help us...\""
))
; Else, if the player has declined before...
(scrSetDesc gScreen "\"You're back! Look, we're desperate. We're offering 15000 creds here! I know it will be tough, but you're our only chance. Please reconsider our offer...\"")
)
)
; Else (if the mission is complete)...
(scrSetDesc gScreen "The centre buzzes with life, and everyone nods to you in aknowledgement when you enter.")
)
</Initialize>
<Actions>
<Action name="Continue" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="C">
<ShowPane pane="Proposal"/>
</Action>
</Actions>
</MeetingHall>
<Proposal>
<Initialize>
(scrSetDesc gScreen (cat
"\"If you can defend our station, we're prepared to offer you " (objGetStaticData gSource "Reward")
" credits in compensation (which is frankly all we've been able to collect on short notice). What do you say?\""
))
</Initialize>
<Actions>
<Action name="Accept" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="A">
(block Nil
(objSetData gSource "State" "in-progress")
(scrShowPane gScreen "AcceptProposal")
)
</Action>
<Action name="Decline" imageID="&rsItemListScreen;" imageIndex="1" cancel="1" key="D">
(block Nil
(objSetData gSource "Declined" 1)
(scrShowPane gScreen "DeclineProposal")
)
</Action>
</Actions>
</Proposal>
<AcceptProposal>
<Initialize>
(scrSetDesc gScreen (cat
"\"Well done that pilot! now, hurry, they're almost here! "
"the first wave is a group of heavier gunships, it shouldn't be too hard, compared to what we think if coming... "
"Well, we better get to the shelters. Thanks again!\""
))
</Initialize>
<Actions>
<Action name="Undock" imageID="&rsItemListScreen;" imageIndex="1" default="1" cancel="1" key="U">
(block Nil
(objSetData gSource "WaveReady" Nil)
(sysAddObjTimerEvent (random 30 150) gSource "OnTimer")
(scrExitDock gScreen)
)
</Action>
</Actions>
</AcceptProposal>
<DeclineProposal>
<Initialize>
(scrSetDesc gScreen (cat
"\"Well, I suppose I shouldn't have expected you to risk your life for us.\" He offers you his hand, "
"\"Thanks, anyways. May Talon be with us all...\""
))
</Initialize>
<Actions>
<Action name="Undock" imageID="&rsItemListScreen;" imageIndex="1" default="1" cancel="1" key="U">
<Exit/>
</Action>
</Actions>
</DeclineProposal>
<MissionStatus>
<Initialize>
(switch
; If the station is actively under attack...
(objIsUnderAttack gSource)
(block Nil
(scrSetDesc gScreen "\"What are you doing in here!? we're under attack! get out there and fight them!\"")
(setq gState "under-attack")
)
; If the wave hasn't arrived yet...
(not (objGetData gSource "WaveReady"))
(block Nil
(scrSetDesc gScreen
(item (item (objGetStaticData gSource "WaveData") (objGetData gSource "Wave")) 1)
)
(setq gState "waiting")
)
; If we have more waves to go...
(gr (count (objGetStaticData gSource "WaveData")) (add (objGetData gSource "Wave") 1))
(block Nil
(scrSetDesc gScreen
(item (item (objGetStaticData gSource "WaveData") (add (objGetData gSource "Wave") 1)) 1)
)
(setq gState "next")
)
; Otherwise, we are done...
(block Nil
(scrSetDesc gScreen (cat
"\"You've done it! I haven't seen fighting like that since the videos of the A-2 in action! "
" As promised, we've deposited " (objGetStaticData gSource "Reward") " credits into your account.\"")
)
(if (not (eq gState "done"))
(block Nil
(plyCredit gPlayer (objGetStaticData gSource "Reward"))
(setq gState "done")
)
)
)
)
</Initialize>
<Actions>
<Action name="Undock" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" default="1" key="U">
(block Nil
(switch
(eq gState "next")
(block Nil
(objSetData gSource "Wave" (add (objGetData gSource "Wave") 1))
(objSetData gSource "WaveReady" Nil)
(sysAddObjTimerEvent (random 30 150) gSource "OnTimer")
)
(eq gState "done")
(objSetData gSource "State" "done")
)
(scrExitDock gScreen)
)
</Action>
</Actions>
</MissionStatus>
<CommoditiesExchange>
<Initialize>
(scrSetDesc gScreen (cat "Welcome to the Talon outpost Commodities Exchange Market."))
</Initialize>
<Actions>
<Action name="Buy items" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="B">
(block Nil
(setq gPrevScreen "&dsTICoutpost;")
(setq gMargin 10)
(setq gShowCriteria "*NU -Illegal;")
(scrShowScreen gScreen "&dsExchangeBuy;")
)
</Action>
<Action name="Sell items" imageID="&rsItemListScreen;" imageIndex="1" key="S">
(block Nil
(setq gPrevScreen "&dsTICoutpost;")
(setq gMargin 10)
(setq gBuyCriteria "*NU -Illegal; -ID;")
(setq gMaxPrice 100000)
(setq gTitle Nil)
(scrShowScreen gScreen "&dsExchangeSell;")
)
</Action>
<Action name="Done" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="D">
<ShowPane pane="DefaultWithInfo"/>
</Action>
</Actions>
</CommoditiesExchange>
<DockServices
desc= "You are at the docking services terminal.">
<Actions>
<Action name="Refuel" imageID="&rsItemListScreen;" imageIndex="1" key="R">
(block Nil
(setq gPrevScreen "Main")
(setq gPrevPane "DockServices")
(intSetCompatibleFuel '((&itHeliumAssembly; 70) (&itHelium3FuelRod; 22)))
(scrShowScreen gScreen "&dsRefuel;")
)
</Action>
<Action name="Repair or replace armor" imageID="&rsItemListScreen;" imageIndex="1" key="A" >
(block Nil
(setq gPrevScreen "Main")
(setq gPrevPane "DockServices")
(setq gTechLevel 3)
(setq gArmorSegment 0)
(setq gMargin 100)
(scrShowScreen gScreen "&dsRepairArmor;")
)
</Action>
<Action name="Done" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="D">
<ShowPane pane="Default"/>
</Action>
</Actions>
</DockServices>
</Panes>
</Main>
</DockScreens>
<DockingPorts>
<Port x="0" y="0" />
<Port x="32" y="-32" />
<Port x="-32" y="32" />
<Port x="-32" y="-32" />
</DockingPorts>
</StationType>
It goes in my big mod, so Its not a lack of the "transcendence extension" line ( I doubt it would cause that error either)
Can you make a mod file where your argricultural station appears on the first level so that people can test it out easily?
Also, for debugging it... you can try commenting out your modified code and then adding it back in a piece at a time. (aka incremental testing) That should help you track down the source of the bug.
Also, for debugging it... you can try commenting out your modified code and then adding it back in a piece at a time. (aka incremental testing) That should help you track down the source of the bug.
~
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
okies, I'll add it later.
EDIT: here's the link: http://www.freewebs.com/evilbobol/stationtest.xml
you'll have to "save target as"
EDIT: here's the link: http://www.freewebs.com/evilbobol/stationtest.xml
you'll have to "save target as"
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
I believe the problem is that the <EncounterTable> tag is not supported in extensions in 0.97. For now you'll have to add that to the main XML.evilbob wrote:here's the link: http://www.freewebs.com/evilbobol/stationtest.xml
I've fixed that for the next release.
Last edited by george moromisato on Mon Feb 12, 2007 5:42 pm, edited 1 time in total.
- goat not sheep
- Militia Captain
- Posts: 669
- Joined: Fri May 19, 2006 8:36 pm
- Location: ...
- Contact:
Not very soon, I believe, if he puts all of his ideas to the next release...
>.<
and, yet again, help needed
yep, the old "crash on entering system". WHY?
Code: Select all
<?xml version="1.0" ?>
<!DOCTYPE TranscendenceExtension
[
<!ENTITY unidExtension "0xD2021000">
<!ENTITY stSalvager "0xD2021001">
<!ENTITY rsSalvagerstation "0xD2021002">
]>
<TranscendenceExtension UNID="&unidExtension;" version="0.96">
<Image UNID="&rsSalvagerstation;" bitmap="bmcomplex.jpg" bitmask="bmcomplexmask.bmp" backColor="0x00000000"/>
<!-- Salvager station -->
<StationType UNID="&stSalvager;"
name= "=(objGetName gSource)"
sovereign= "&svIndependent;"
dockScreen= "Main"
abandonedScreen= "&dsAbandonedStation;"
dockingPorts= "11"
canAttack= "true"
multiHull= "true"
armorID= "&itPlasteelPlate;"
maxHitPoints= "200"
hitPoints= "150"
repairRate= "1"
shipRepairRate= "1"
ejectaType= "&vtWreckEjecta;"
attributes= "commonwealth,friendly,primary,populated"
levelFrequency= "cucuu cuurr ------ ----- -----"
locationCriteria= "+planetary,-OuterSystem"
noArticle= "true"
>
<Image imageID="&rsSalvagerstation;" imageX="0" imageY="0" imageWidth="256" imageHeight="256"/>
<Names>Salvager station;</Names>
<Devices>
<Device deviceID="&itMarkIIIHowitzer;" omnidirectional="true"/>
</Devices>
<Items>
<RandomItem count="4d6"
criteria= "*D -Illegal; -Alien"
level= "4"
levelCurve= "3"
damaged= "100"
/>
<RandomItem count="5"
criteria= "* -Illegal; -Alien; -Specialty"
level= "3"
levelCurve= "1"
/>
<Item count="4d12" item="&itHelium3FuelRod;" />
</Items>
<Ships>
<Table count="2">
<Ship chance="50" count="1" class="&scEI100M;" orders="guard"/>
<Ship chance="30" count="1" class="&scRoninB;" orders="guard"/>
<Ship chance="20" count="1" class="&scBorer-II;" orders="guard"/>
</Table>
<Table count="1d4">
<Ship chance="50" count="1" class="&scEI100;" orders="gate"/>
<Ship chance="20" count="1" class="&scSapphireYacht;" orders="gate"/>
<Ship chance="20" count="1" class="&scBorer;" orders="gate"/>
<Ship chance="10" count="1" class="&scRoninC;" orders="guard"/>
</Table>
</Ships>
<Reinforcements minShips="5">
<Table>
<Ship chance="25" count="1" class="&scEI100;" orders="gate"/>
<Ship chance="10" count="1" class="&scSapphireYacht;" orders="gate"/>
<Ship chance="15" count="1" class="&scBorer;" orders="gate"/>
<Ship chance="25" count="1" class="&scRoninB;" orders="guard"/>
<Ship chance="25" count="1" class="&scRoninC;" orders="guard"/>
</Table>
</Reinforcements>
<Satellites>
<Orbitals count="3d3+15" distance="3d8+3" scale="light-second" angle="random">
<Station type="&stShipwreck1;"/>
</Orbitals>
</Satellites>
<DockScreens>
<Main
name= "=(objGetName gSource)"
backgroundID= "&rsShipInterior;"
>
<Panes>
<Default
desc= "You are in the docking bay of a Scavenger station. There are damaged items all around, and several damaged ships nearby.">
<Actions>
<Action name="Commodities Exchange" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="C">
<ShowPane pane="CommoditiesExchange"/>
</Action>
<Action name="Dock Services" imageID="&rsItemListScreen;" imageIndex="1" key="D">
<ShowPane pane="DockServices"/>
</Action>
<Action name="Undock" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="U">
<Exit/>
</Action>
</Actions>
</Default>
<CommoditiesExchange>
<Initialize>
(scrSetDesc gScreen (cat "Welcome to the " (objGetName gSource) " Commodities Exchange Market."))
</Initialize>
<Actions>
<Action name="Buy items" imageID="&rsItemListScreen;" imageIndex="1" default="1" key="B">
(block Nil
(setq gPrevScreen "Main")
(setq gMargin 10)
(setq gShowCriteria "*NUD -Illegal;")
(scrShowScreen gScreen "&dsExchangeBuy;")
)
</Action>
<Action name="Sell items" imageID="&rsItemListScreen;" imageIndex="1" key="S">
(block Nil
(setq gPrevScreen "Main")
(setq gMargin 10)
(setq gBuyCriteria "*NUD -Illegal; -ID;")
(setq gMaxPrice 50000)
(setq gTitle Nil)
(scrShowScreen gScreen "&dsExchangeSell;")
)
</Action>
<Action name="Done" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="D">
<ShowPane pane="Default"/>
</Action>
</Actions>
</CommoditiesExchange>
<DockServices
desc= "You are at the docking services terminal.">
<Actions>
<Action name="Refuel" imageID="&rsItemListScreen;" imageIndex="1" key="R">
(block Nil
(setq gPrevScreen "Main")
(setq gPrevPane "DockServices")
(intSetCompatibleFuel '((&itHeliumAssembly; 70) (&itHelium3FuelRod; 22)))
(scrShowScreen gScreen "&dsRefuel;")
)
</Action>
<Action name="Repair or replace armor" imageID="&rsItemListScreen;" imageIndex="1" key="A" >
(block Nil
(setq gPrevScreen "Main")
(setq gPrevPane "DockServices")
(setq gTechLevel 3)
(setq gArmorSegment 0)
(setq gMargin 100)
(scrShowScreen gScreen "&dsRepairArmor;")
)
</Action>
<Action name="Done" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="D">
<ShowPane pane="Default"/>
</Action>
</Actions>
</DockServices>
</Panes>
</Main>
</DockScreens>
<DockingPorts>
<Port x="53" y="146" />
<Port x="-92" y="100" />
<Port x="-148" y="-42" />
<Port x="-64" y="-134" />
<Port x="108" y="-116" />
<Port x="148" y="5" />
<Port x="62" y="43" />
<Port x="-19" y="76" />
<Port x="-67" y="12" />
<Port x="-72" y="-60" />
<Port x="12" y="-72" />
</DockingPorts>
</StationType>
</TranscendenceExtension>
Ah, another debugging challenge! Cool.
You know, I normally hate debugging... but when it's posted on a forum--almost as a challenge--then it's kinda fun. (So I guess that means I can debug other people's stuff but not my own. Hmmm.)
Anyway, I found the problem. (I used my "pocket space station mod" to test it, if you're wondering.) The problem is the capital "D" in the criteria line. Remove the "D", or use a lowercase "d", and it works.
___________
And now for a philosophical programming question: Is this a bug or not?
One could argue: "It's just bad input data; the program isn't supposed to be getting data like that. In other words; it's the mod's fault, not the program's, so crashing is fine."
On the other hand, one could argue: "A program should do it's best to respond intelligently, no matter what the data. And if bad input data is going to break the program, then the program should at least give you an idea what the bad data is. So crashing without so much as a 'how do you do' error message is unnaceptable."
Eh, it's a very obscure bug, in any case.
You know, I normally hate debugging... but when it's posted on a forum--almost as a challenge--then it's kinda fun. (So I guess that means I can debug other people's stuff but not my own. Hmmm.)
Anyway, I found the problem. (I used my "pocket space station mod" to test it, if you're wondering.) The problem is the capital "D" in the criteria line. Remove the "D", or use a lowercase "d", and it works.
___________
And now for a philosophical programming question: Is this a bug or not?
One could argue: "It's just bad input data; the program isn't supposed to be getting data like that. In other words; it's the mod's fault, not the program's, so crashing is fine."
On the other hand, one could argue: "A program should do it's best to respond intelligently, no matter what the data. And if bad input data is going to break the program, then the program should at least give you an idea what the bad data is. So crashing without so much as a 'how do you do' error message is unnaceptable."
Eh, it's a very obscure bug, in any case.
Last edited by Karl on Fri Feb 16, 2007 1:39 pm, edited 1 time in total.
~
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!
[Grabs a box of batteries.] The power is mine! MINE! Ah hahaha! AHHHH HAHAHA!