Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Revenge_on_Hesperus_for_ripping_me_off.oxp

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

Cmdr. Maegil wrote:
What are those simbols? Felix the cat on a bad day?

I was't the first. Na, na, na, ~~na!
umm yeah....you think there are copyright issues?
Riding the Rocket!
User avatar
Cmdr. Maegil
Sword-toting nut-job
Sword-toting nut-job
Posts: 1294
Joined: Tue Feb 27, 2007 10:28 pm
Location: On the mend in Western Africa

Post by Cmdr. Maegil »

Arexack_Heretic wrote:
Cmdr. Maegil wrote:
What are those simbols? Felix the cat on a bad day?
umm yeah....you think there are copyright issues?
Only if it gets found out by the owners. Anyhow, it'd cost them more to mail a cease and desist than to just ignore it.

P.S.: We know Felix! Aren't we a bunch of old farts?
You know those who, having been mugged and stabbed, fired, dog run over, house burned down, wife eloped with best friend, daughters becoming prostitutes and their countries invaded - still say that "all is well"?
I'm obviously not one of them.
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2312
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post by Captain Hesperus »

Cmdr. Maegil wrote:
P.S.: We know Felix! Aren't we a bunch of old farts?
And oddly appropriate.
"Let me see what I have in my magic bag..."
<proot>
"It's a Trumble!"
<proot>
"And another."
<proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot> <proot>
"There, aren't you lucky! That'll be four hundred Credits, please."

Captain Hesperus
The truth, revealed!!
Image
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Hi, A_H. I just found the time to have a closer look into the code you posted and I found that it's indeed quite buggy. So I wouldn't wonder why Oolite could refuse to run it.

I'm not at all sure I found all the bugs, but here are some:

Code: Select all

{ 
    "DEFENSE_MODE" = { 
        ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel); 
        ENTER = (checkTargetLegalStatus); 
        EXIT = (); 
        "RED_ALERT" = (performGroupAttack); 
        "YELLOW_ALERT" = (performAttack); 
        "CONDITION_YELLOW" = (requestEscort); 
        "CONDITION_GREEN" = ("setStateTo: CHECK_FOR_DEBRIS"); 
        "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
        "TARGET_OFFENDER" = (increaseAlertLevel, "targetCommsMessage: [police_warning]"); 
        "TARGET_FUGITIVE" = (increaseAlertLevel, "targetCommsMessage: [police_warning]"); 
        "ENERGY_FULL" = ("pauseAI: 1.0", "setStateTo: IDLE"); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 150", increaseAlertLevel); 
        "TARGET_DESTROYED" = ("pauseAI: 1.0", "setStateTo: IDLE"); 
        "TARGET_LOST" = ("pauseAI: 1.0", "setStateTo: IDLE"); 
        "NO_TARGET" = ("pauseAI: 1.0", "setStateTo: IDLE"); 
        UPDATE = (); 
    }; 
    GLOBAL = {ENTER = ("setStateTo: IDLE"); EXIT = (); UPDATE = (); }; 
    IDLE = { 
        ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
        "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 150", increaseAlertLevel); 
        ENTER = ("pauseAI: 5.0"); 
        EXIT = (); 
        "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
        UPDATE = (decreaseAlertLevel, "setStateTo: SCAN_FOR_SHIPS"); 
    }; 
    SCAN_FOR_SHIPS = { 
    ENTER = ("scanForShipsWithRole: player"); 
    UPDATE = (); 
    TARGET_FOUND = (setTargetToFoundTarget, "sendCommsMessageToTarget: [This station is out of order]", "pauseAI:5", "sendCommsMessageToTarget: [Some idiot managed to ram all four sides of the dock before the grapplingfield got a lock on him.]", "pauseAI:5.0", "sendCommsMessageToTarget: [Please follow beacon-1]", "pauseAI: 5.0", "setStateTo: IDLE"); 
    NOTHING_FOUND = ("pauseAI:10","setStateTo: IDLE"); 
    EXIT = (); 
    ATTACKED = (setTargetToPrimaryAggressor, increaseAlertLevel, "setStateTo: DEFENSE_MODE"); 
    "OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 150", increaseAlertLevel); 
    "INCOMING_MISSILE" = (fireECM, increaseAlertLevel); 
    }; 
}
In the SCAN_FOR_SHIPS-state the commsMessages have to be "sendTargetCommsMessage" instead of "sendCommsMessageToTarget". Also I'm not sure whether the pauseAI in the NOTHING_FOUND-part would need a blank behind the seperator.

Code: Select all

   <key>Dubious_Escape1</key> 
   <dict> 
      <key>like_ship</key> 
      <string>escape-capsule</string> 
      <key>cargo_type</key> 
      <string>CARGO_SCRIPTED_ITEM</string> 
      <key>death_actions</key> 
         <array> 
            <dict> 
               <key>conditions</key> 
                  <array> 
                     <string>mission_trumblerevenge: COMPLETED_CAPTURED<string> 
                  </array> 
               <key>do</key> 
                  <array><string><string></array> 
               <key>else</key> 
                  <array> 
                     <string>"set: mission_trumblerevenge COMPLETED_DEAD"</string> 
                     <string>CommsMessage: so cruel...</string> 
                  </array> 
            </dict> 
         </array> 
      <key>script_actions</key> 
         <array> 
            <dict> 
               <key>conditions</key> 
                  <array> 
                     <string>mission_trumblerevenge: COMPLETED_SHIPDESTROYED<string> 
                  <array> 
               <key>do</key> 
                  <array> 
                     <string>increment: mission_variable_hesperus_lives</string> 
                     <string>set: mission_trumblerevenge COMPLETED_CAPTURED</string> 
                     <string>CommsMessage: Hey! destroying my ship was totally uncalled for!</string> 
                  <array> 
               <key>else</key> 
                  <array> 
                     <string>awardCargo: Slaves 1</string> 
                     <string>CommsMessage: Hi, thanks for rescueing us. I'm Stepan, the navigator. Do you have chewy-bars onboard? Thermadore and Bique are not quite to my taste. Hesperus is not abourd this pod Unfortunately.</string> 
                  <array> 
            </dict> 
         </array> 
      <key>roles</key> 
         <string>dubious-escape</string> 
   </dict> 
   <key>Dubious_cargo1</key> 
   <dict> 
      <key>like_ship</key> 
      <string>infected-cargopod</string> 
      <key>cargo_type</key> 
      <string>CARGO_SCRIPTED_ITEM</string> 
      <key>model</key> 
      <string>cargo4g.dat</string> 
      <key>name</key> 
      <string>cargopod</string> 
      <key>script_actions</key> 
      <string> 
         <array> 
            <string>awardCargo: EQ_TRUMBLE</string> 
            <string>awardCargo: 1 furs</string> 
         </array> 
      </string> 
      <key>roles</key> 
      <string>dubious-cargopod</string> 
   </dict> 
   <key>Dubious_cargo2</key> 
   <dict> 
      <key>like_ship</key> 
      <string>cargopod</string> 
      <key>model</key> 
      <string>cargo3.dat</string> 
      <key>cargo_type</key> 
      <string>CARGO_CARRIED</string> 
      <key>cargo_carried</key> 
      <string>Narcotics</string> 
      <key>roles</key> 
      <string>dubious-cargopod</string> 
   </dict> 
   <key>Dubious_cargo3</key> 
   <dict> 
      <key>like_ship</key> 
      <string>infected-cargopod</string> 
      <key>roles</key> 
      <string>dubious-cargopod</string> 
   </dict> 
   <key>Cat_In_Box</key> 
   <dict> 
      <key>like_ship</key> 
      <string>infected-cargopod</string> 
      <key>cargo_type</key> 
      <string>CARGO_SCRIPTED_ITEM</string> 
      <key>death_actions</key> 
      <string> 
         <array> 
            <dict> 
               <key>conditions</key> 
                  <array> 
                     <string>mission_trumblerevenge: COMPLETED_CAPTURED<string> 
                  </array> 
               <key>do</key> 
                  <array><string>awardCargo: Gold 10</string></array> 
               <key>else</key> 
                  <array><string>commsMessage: Mewl!</string> 
                  <string>set: mission_trumblerevenge COMPLETED_DEAD</string></array> 
            </dict> 
         </array> 
      </string> 
      <key>script_actions</key> 
      <string> 
         <array> 
            <dict> 
               <key>conditions</key> 
                  <string>mission_trumblerevenge: COMPLETED_CAPTURED</string> 
               <key>do</key> 
                  <string>awardEquipment: EQ_TRUMBLE</string> 
                  <string>awardCargo: 1 Narcotics</string> 
               <key>else</key> 
                  <string>increment: mission_variable_hesperus_lives</string> 
                  <string>set: mission_trumblerevenge COMPLETED_CAPTURED</string> 
            </dict> 
         </array> 
      </string> 
      <key>roles</key> 
      <string>dubious-escape</string> 
   </dict>
Lots and lots of missing "/" in closing </string> and </array>. You have to check it line by line. And you don't need the quotationmarks in line 18. However I don't know if they can do harm.

There is also a typo. It should be "Hesperus is not aboard..." instead of "abourd".

Code: Select all

/**    Hesperus found at Tianve, galaxy 0 **/ 
/**    Checking for Tianve_OXP **/ 
{ 
conditions = ( 
   "status_string equals IN_FLIGHT" 
   "galaxy_number equal 0", 
    "planet_number equal 247", 
   "mission_trumblerevenge oneof CHASE, INCUBATING" 
); 
   do = (   "checkForShips: station-pulsar", 
      { 
         conditions = ("shipsFound_number greaterThan 0"); 
         do = ("set: mission_variable_TianvePulsar INSTALLED", "checkForShips: Dubious_Profit" ); 
            { 
               conditions = ("shipsFound_number equal 0", "mission_variable_hesperus_lives greaterThan 0"); 
               do = ("addShipsAtPrecisely: Dubious_Profit 1 pwm -4381198.00 2271925.50 623546.50"); 
            } 
         ); 
         else =  ("set: mission_variable_TianvePulsar NONE", "checkForShips: Dubious_Profit", 
            { 
               conditions = ("shipsFound_number equal 0", "mission_variable_hesperus_lives greaterThan 0"); 
               do = ("addShips: Dubious_Profit 1"); 
            } 
         ); 
      } 
   ); 
},
and

Code: Select all

/** Reactivating trumbles **/ 
{ 
   conditions = ( 
   "mission_trumble equal TRUMBLE_BOUGHT", "dockedAtMainStation_bool equal YES",); 
   do = ( 
      { 
         conditions = ("score_number greaterThan 5000"); 
         do = (); 
         else = ( 
            { 
               conditions = ("score_number greaterThan 4000"); 
               do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
               else = ( 
                  { 
                     conditions = ("score_number greaterThan 3000"); 
                     do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                     else = ( 
                        { 
                           conditions = ("score_number greaterThan 2000"); 
                           do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                           else = ( 
                              { 
                                 conditions = ("score_number greaterThan 1500"); 
                                 do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                                 else = ( 
                                    { 
                                       conditions = ("score_number greaterThan 1000"); 
                                       do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                                       else = ( 
                                          { 
                                             conditions = ("score_number greaterThan 750"); 
                                             do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                                             else = ( 
                                                { 
                                                   conditions = ("score_number greaterThan 500"); 
                                                   do = ("reset: mission_trumble", "reset: mission_trumblerevenge"); 
                                                } 
                                             ); 
                                          } 
                                       ); 
                                    } 
                                 ); 
                              } 
                           ); 
                        } 
                     ); 
                  } 
               ); 
            } 
         ); 
      } 
   ) 
}
It's "greaterthan" or "morethan" or "lessthan". No capital "T" in the middle.

Code: Select all

/**   Determine trumble status **/ 
{ 
   conditions = ( 
      status_string equal STATUS_DOCKED 
   ); 
   do = ( 
      "testForEquipment: EQ_TRUMBLE", 
      { 
         conditions = ( 
            "foundEquipment_bool equal YES" 
         ); 
         do = ( 
            "set: mission_variable_trumblecheck GOT_TRUMBLE" 
         ); 
         else = ( 
            "set: mission_variable_trumblecheck NOT_TRUMBLE" 
         ); 
      } 
   ); 
}, 
/**   Block docking at Hermits with pets **/
.
.
.

There have to be quotationmarks in the first condition.

No guarantee that I spotted all the bugs. But it might at least help you squashing some of them.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Also I'm not sure whether the pauseAI in the NOTHING_FOUND-part would need a blank behind the seperator.
Yes, it does.
Commander McLane wrote:
And you don't need the quotationmarks in line 18. However I don't know if they can do harm.
Yes, they can.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

@McL:
sorry you have spent so much time squashing my bugs... it may have been in vain, as I already spent 3hours last night doing that same thing. :/

I haden't taken the time to copy paste current code, as I just spent a 12hour day in the lab... :beat: ...was messing with a model. and just about to goto bed.


I'll replace the code now. before more of you start mopping up messes that have already been mopped. ;)

not in vain! :D
My corrections are restricted mostly to the syntax, thanks for the other corrections.
(the super-faulty line in the stationAI / typo in the pod comms etc)
And you don't need the quotationmarks in line 18.
wellspotted!

not sure whether greaterthan and greaterThan matters, but it'll be just a matter of search/replacing. :)

The help is greatly appreciated.
:oops:

copypasted. time for a catnap.
@C.H: lol
Riding the Rocket!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Arexack_Heretic wrote:
not sure whether greaterthan and greaterThan matters, but it'll be just a matter of search/replacing. :)
Everything matters. *checks* …including this.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

I have always used greaterThan lessThan etc.
...maybe why my scripts kept failing.
Riding the Rocket!
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

Wot dis mean?
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

blowing DP up does this CTD.

Code: Select all

<key>death_actions</key>
			<array>
				<string>decrement: mission_variable_hesperus_lives</string>
				<string>set: mission_trumblerevenge COMPLETED_SHIPDESTROYED</string>
				<string>commsMessage: KATCHICK! BO.....</string>
				<string>ejectItem: dubious-escape 1</string>
				<string>ejectItem: Cat_In_Box 1</string>
				<string>ejectItem: dubious-cargopod 5</string>
				<string>ejectItem: infected-cargopod 3</string>
			</array>
probably it is the catinbox, dubiouscargo, infectedpod and dub-esc pod
As only the hatchling is spawned....
testing later gotta do errands.
Riding the Rocket!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Reckon so as EjectItem is not valid for anything except the player. Remember Roberto had endless problems with this? See this thread https://bb.oolite.space/viewtopic.ph ... &start=105
and particularly Judberts answer on the last page.

spawn: dubious-escape 1 should do it though.

Not sure what the code explanation for the paurchaute-deployed bit is, but it comes up when Oolite gets very upset about somthing! :wink:
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Arexack_Heretic wrote:
Wot dis mean?
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
That means Oolite crashed.

I’d quite like to see a test case OXP demonstrating the problem.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

lol figured that... It didn't say anything else before crashing so I thought I'd ask.
too many trumbles in it still for a test_oxp even.
(The holes are bigger than the ship the story is built around.)

I'll test each part in itself then bring them together, if things still crash, I'll plead for some help.

Not before it is really neccesary though.
Don't want to spend my code-monkey time allotment on something frivolous as a messed up shiplist.
;)
Riding the Rocket!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

My general view here is that it should not be possible for a bad plist or script to crash the game. Consistent crashes due to a given plist or script aren’t top priority, since they generally only affect OXP developers, but they should still be squished.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

just had a fun bug:

My (defective) cargopods were replaced by ghostly copies of other ships, they could be targeted, but not shot.
before the pods were scanned, but invisible.
It was probably a combo with the 'Fullscreen' bug, as I somehow resized my screen, without losing textures.

edit: it seems the crashbug has gone...

but what is THIS about?

Code: Select all

2007-06-07 21:17:16.000 oolite.exe[2356] [script.debug.syntax.action.badSelector]: ***** PlayerEntity DOES NOT RESPOND TO scriptAction: "CommsMessage: so cruel . . ."
a normal commsmessage sent as a deathaction, no?
ah... C != c.
Riding the Rocket!
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Just a mis-spelled method again: should be commsMessage (no capital C).
Post Reply