Oolite Bulletins

For information and discussion about Oolite.
It is currently Sat Dec 16, 2017 4:39 pm

All times are UTC




Post new topic  Reply to topic  [ 50 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
 Post subject:
PostPosted: Thu Oct 07, 2010 5:08 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Tue Sep 07, 2010 2:23 pm
Posts: 803
It would appear that if one is a Fugitive, docking at a FTZ actually reduces your legal status to Offender!

One consequence of this is that after one survives a sortie with the Thargoids as a reserve for the Galactic Navy (in the oxp of the same name), and then detonates an Energy Bomb to clear up all the little Thargoid Robot Fighters, and, somewhat less sportingly, a whole bunch of your former Navy comrades as well (thereby becoming a Fugitive), one can make a short trip to your nearest Multi-Government system, stop by the FTZ to become an Offender, and then blast a few pirates on the way to the planet to become clean again. (Whew, that was a monster of a sentence!)

A quick, easy and morally dubious way to gain 100+ kills while remaining Clean!


Top
   
 Post subject:
PostPosted: Thu Oct 07, 2010 8:02 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5874
Location: Carter's Snort
Quote:
It would appear that if one is a Fugitive, docking at a FTZ actually reduces your legal status to Offender!
Confirmed, but I'm not sure why. The FTZ script.plist is as follows:
Code:
{

free-trade-zone = (
        {
            conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2"
            		); 
            do = ( "addShipsAt: free_trade_zone 1 wpu 0 0 -0.3",
		      "addShipsAtPrecisely: ftzpirate 2 wpu 0 0 -0.25",
              "reset: local_freetradezone_marked");       
          
        },  
       {
           conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 75"
            ); 
            do = ( "addShipsAtPrecisely: pirate 2 wpu 0 0 -0.25"); 
        },
       {
           conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 30"
            ); 
            do = ( "addShipsAtPrecisely: ftzpirate 2 wpu 0 0 -0.2"); 
        },
       {
           conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
                "systemEconomy_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 70"
            ); 
            do = ( "addShipsAtPrecisely: ftzpirate 4 wpu 0 0 -0.15"); 
        },        
       {
           conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 50"
            ); 
            do = ( "addShipsWithinRadius: ftzhauler 1 wpu 0 0 -0.2 5000"); 
        },       
       {
           conditions = (
                "status_string equal STATUS_EXITING_WITCHSPACE", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 75"
            ); 
            do = ( "addShipsWithinRadius: ftzhauler 1 wpu 0 0 -0.25 5000"); 
        },       
	{
            conditions = (
              "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2"
            		); 
	do = ( "checkForShips: free_trade_zone",
		{ conditions = ("shipsFound_number equal 0" ); 
		
            do = ( "addShipsAt: free_trade_zone 1 wpu 0 0 -0.3"); }  );  

	},              
       {
           conditions = (
                "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 50"
            ); 
            do = ( "addShipsWithinRadius: pirate 2 wpu 0 0 -0.3 10000"); 
        },       
       {
           conditions = (
                "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 75"
            ); 
            do = ( "addShipsWithinRadius: ftzpirate 2 wpu 0 0 -0.3 10000"); 
        },       
       {
           conditions = (
                "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 50"
            ); 
            do = ( "addShipsWithinRadius: ftzhauler 1 wpu 0 0 -0.2 5000"); 
        },       
       {
           conditions = (
                "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 75"
            ); 
            do = ( "addShipsWithinRadius: ftzhauler 1 wpu 0 0 -0.25 5000"); 
        },       
       {
           conditions = (
                "status_string equal STATUS_LAUNCHING", 
                "planet_number greaterthan -1",
		 "systemGovernment_number equal 2",
                "d100_number greaterthan 90"
            ); 
            do = ( "addShipsWithinRadius: police 6 wpu 0 0 -0.3 5000"); 
        },       
       { 
            conditions = ( 
                "status_string equal STATUS_DOCKED", 
                "dockedStationName_string equal Free Trade Zone", 
                "local_freetradezone_marked undefined" 
            ); 
            do = ( 
            "set: mission_freetradezone_fine [legalStatus_number]", 
            "add: mission_freetradezone_fine 5", 
            "setLegalStatus: [mission_freetradezone_fine]", 
            "set: local_freetradezone_marked YES", 
            "reset: mission_freetradezone_fine"
                ); 
      },
    );
}
The specific bit that garnishes visitors' legal status is
Code:
       { 
            conditions = ( 
                "status_string equal STATUS_DOCKED", 
                "dockedStationName_string equal Free Trade Zone", 
                "local_freetradezone_marked undefined" 
            ); 
            do = ( 
            "set: mission_freetradezone_fine [legalStatus_number]", 
            "add: mission_freetradezone_fine 5", 
            "setLegalStatus: [mission_freetradezone_fine]", 
            "set: local_freetradezone_marked YES", 
            "reset: mission_freetradezone_fine"
                ); 
      },
As far as I can see, this should be storing the player's current legal status as a mission variable, adding 5 to it, and then setting the player's legal status to the mission variable – i.e. 5 more than it used to be. Obviously, though, it's not! Anyone got any idea why?

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject:
PostPosted: Thu Oct 07, 2010 8:37 pm 
Offline
---- E L I T E ----
---- E L I T E ----

Joined: Mon May 31, 2010 11:11 pm
Posts: 1963
Maybe it's OR-ing 5 to your legal status, but because it's a binary OR only a byte's worth is kept...so if you're >255 legal status, you are now reduced to 0-255?


Top
   
 Post subject:
PostPosted: Thu Oct 07, 2010 8:40 pm 
Offline
Intergalactic Spam Assassin
Intergalactic Spam Assassin
User avatar

Joined: Thu Dec 14, 2006 9:08 am
Posts: 9520
Location: a Hacker Outpost in a moderately remote area
The code looks correct to me (and I guess it must have worked at some time).

My guess is that for some reason the "set: mission_freetradezone_fine [legalStatus_number]" doesn't work, but will result in mission_freetradezone_fine being set to 0. If the rest of the code is working, 5 would be added to that, so finally legalStatus_number would be set to 5, which would lead to an offender status.

Could you do another test and see whether player.bounty is indeed 5 after this part of the code is run. And also that it stays at 5 with subsequent dockings at the FTZ?

_________________
The Story — The Career — The OXPs


Top
   
 Post subject:
PostPosted: Thu Oct 07, 2010 9:57 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5874
Location: Carter's Snort
A Clean player's bounty is set to 5 after docking. Multiple dockings in the same FTZ (without jumping out) don't add to this (which is the intended result). Go in as a Fugutive, though, and you come out as an Offender with a bounty of 5. It looks indeed as if
Code:
            "set: mission_freetradezone_fine [legalStatus_number]"
is actually setting mission_freetradezone_fine to 0.

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject:
PostPosted: Fri Oct 08, 2010 8:17 am 
Offline
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
User avatar

Joined: Sat Jun 16, 2007 3:48 pm
Posts: 5536
Location: Netherlands
Quote:
is actually setting mission_freetradezone_fine to 0.
Im sure it worked in the past. I used the same construction in the legacy script of thargoidWars because the original code by Murgh did not work. That was explicit tested to work correct. But that was back with Oolite 1.69 or 1.70 at the most as it is now using a JS script.

I just looked in the code and noticed that there are 3 names that are renamed to get more consistent names. In the whilteList.plist there is a list with tho old names for translation to the new ones:
Code:
	query_method_aliases =
	{
		"fuel_leak_rate_number" = "fuelLeakRate_number";
		"fuel_level_number" = "fuelLevel_number";
		"legalStatus_number" = "commanderLegalStatus_number";
	};
Probably the automatic replacement is not working correct. Try if changing the name to "commanderLegalStatus_number" does work. If that new name does work, the Oolite bug is here and the two other names above are likely to not work either in current Oolite. (name change was in r 2098, march 2009)

_________________
UPS-Courier & DeepSpacePirates & others at the box and some older versions


Top
   
 Post subject:
PostPosted: Fri Oct 08, 2010 1:07 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5874
Location: Carter's Snort
Quote:
Probably the automatic replacement is not working correct. Try if changing the name to "commanderLegalStatus_number" does work. If that new name does work, the Oolite bug is here and the two other names above are likely to not work either in current Oolite. (name change was in r 2098, march 2009)
That's done the trick. Go in as a Fugitive, come out as a Fugitive with an extra +5! I'll update and upload the OXP.

Edit: does this mean the new version won't work properly with versions of the game older than March 2009?

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject:
PostPosted: Fri Oct 08, 2010 1:36 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5874
Location: Carter's Snort
New version of the Free Trade Zone OXP now available for download, once again with working legal garnish courtesy of Eric!

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject:
PostPosted: Fri Oct 08, 2010 5:57 pm 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
User avatar

Joined: Mon Jan 21, 2008 11:41 pm
Posts: 3009
Location: The Big Smoke
Quote:
Edit: does this mean the new version won't work properly with versions of the game older than March 2009?
Yep! However, the aim is still get the next stable ( which is still coming, btw ;) ) totally backward compatible with 1.65 save games & OXPs, so the bug discovered by Eric is going to be fixed in the near future! :)

_________________
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)


Top
   
 Post subject:
PostPosted: Sat Oct 09, 2010 9:15 am 
Offline
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
User avatar

Joined: Sat Jun 16, 2007 3:48 pm
Posts: 5536
Location: Netherlands
Quote:
Yep! However, the aim is still get the next stable ( which is still coming, btw ;) ) totally backward compatible with 1.65 save games & OXPs, so the bug discovered by Eric is going to be fixed in the near future! :)
But not by me. :lol: The problem is however that the condition part is handled different than the "DO" part. I just wrote a small script:
Code:
		{
			conditions = (
				"status_string equal STATUS_LAUNCHING",
				"legalStatus_number greaterthan 5",
			);
			do = (
				"set: mission_test [legalStatus_number]",
			);
		},
On startup this is preprocessed and the resulting plist ends up in the cache. When I look in the saved cache file I see the code Oolite is actually working with:
Code:
		(
			YES,
			(
				(
					0,
					"status_string equal STATUS_LAUNCHING",
					"status_string",
					0,
					(
						(
							NO,
							"STATUS_LAUNCHING",
						),
					),
				),
				(
					1,
					"legalStatus_number greaterthan 5",
					"commanderLegalStatus_number",
					3,
					(
						(
							NO,
							5,
						),
					),
				),
			),
			(
				(
					NO,
					"set:",
					"mission_test [legalStatus_number]",
				),
			),
			(),
		),
I see that the replacement in the condition part is correct (at least when I understand the pre-processed plist correct), but not in the DO part. So whoever will try fixing that, must probably look there.

_________________
UPS-Courier & DeepSpacePirates & others at the box and some older versions


Top
   
 Post subject: Re: Free Trade Zone OXP
PostPosted: Thu Jul 05, 2012 3:30 pm 
Offline
Jedi Spam Assassin
Jedi Spam Assassin
User avatar

Joined: Thu Jul 12, 2007 10:54 pm
Posts: 5874
Location: Carter's Snort
Newly updated [wiki]Free Trade Zone[/wiki] page on the wiki, courtesy of Fatleaf: many thanks to him and to all the wiki wizards for their excellent wikiwirk! :D

_________________
Oofiction: Calliope: a Captain Hesperus adventure | Stranglehold: a Captain Hesperus adventure | Local Midnight in the Vacuum Bar | A Farewell to Arms, Legs, etc.: the Blaze O'Glory Story


Top
   
 Post subject: Re: Free Trade Zone OXP
PostPosted: Wed May 18, 2016 11:46 pm 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1841
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Disembodied has very kindly given me permission to update and maintain this OXP going forward. He's also shared some ideas with me on how the OXP may develop in the future.

In version 0.21 (now available via the download manager):
  • Converted model to be a variation of the new Rock Hermit.
  • Added a customised docking tunnel texture for use by BGS.
  • Turned on docking requests.
  • Limited FTZ's to only appear in TL7 systems or higher.
  • Converted plist-style script to Javascript.
  • Updated the populator routine to use the new Oolite populator methods.
  • Added routines to check if the FTZ was destroyed in a system, and only recreate the station after 30 days have passed.
  • Updated the market script to use the new style.
  • Added an option for commanders who dock at the station to either take the bounty increase, or pay a fine.
The [EliteWiki] Free Trade Zone Wiki page has also been updated to reflect the changes.

_________________
My OXP's


Top
   
 Post subject: Re: Free Trade Zone OXP
PostPosted: Wed May 18, 2016 11:57 pm 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12970
Location: Corke's Drift
Not tried this OXP before - has it always used Z on the ASC? Zieman Habitats also use Z, you see.

Not that it's a problem - just curious.

_________________
The only good fnord is a dead fnord!


Top
   
 Post subject: Re: Free Trade Zone OXP
PostPosted: Thu May 19, 2016 12:33 am 
Offline
Commodore
Commodore
User avatar

Joined: Tue Jan 21, 2014 10:37 pm
Posts: 1841
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...
Quote:
has it always used Z on the ASC?
As far as I'm aware it's always had Z. I can easily change it to something else, although I'm not sure what to.

_________________
My OXP's


Top
   
 Post subject: Re: Free Trade Zone OXP
PostPosted: Thu May 19, 2016 1:14 am 
Online
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
User avatar

Joined: Sat Jul 04, 2009 9:31 pm
Posts: 12970
Location: Corke's Drift
Quote:
I can easily change it to something else, although I'm not sure what to.
No need - plenty of multiple usages on the ASC already, and it's easy to tell FTZs from ZHs anyway.

_________________
The only good fnord is a dead fnord!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 50 posts ]  Go to page Previous 1 2 3 4 Next

All times are UTC


Who is online

Users browsing this forum: Yahoo [Bot] and 18 guests


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

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited