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

The Feudal States

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

Moderators: winston, another_commander

User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post by Ramirez »

I don't disagree with any of your obsevations DeathKnyte, so don't feel you need to give evidence or anything! I just haven't worked out how to improve things yet.

Note the number of opponents available is currently infinite - although I set up three menu pages that suggest a limited selection, I left it open and as you've seen it actually just loops round and creates another random set. Similarly, fighting 16 duels on one visit seems a bit excessive and I can easily limit this to just two or three, but then players might get frustrated if they can't ever find a suitable opponent.

Tricky things these, OXPs. You put everything in at the beginning but then you find you have to take things back!

CommRLock78, the specific check the OXP does for tournament eligibility involves looking up the subentities and running a crude check for anything turret-related:

Code: Select all

this.checkPlayerShip = function()
{	this.playerSubentities = player.ship.subEntities
	this.playerSubentitiesString = playerSubentities.toString();
	if(playerSubentitiesString.indexOf("turret") != -1)
	missionVariables.feudal_tournament_eligible = "FALSE"}
If you're familiar with the debug console, try typing in 'player.ship.subEntities' and see what that returns. There must still be a turret in there somewhere.

As you'll probably appreciate, this bit of code is pretty much targetted at ships like the Caduceus, not only because of the turrets themselves but also because any ship capable of mouting turrets is likely to have fairly powerful stats that may make the tournament too easy.
Download Resistance Commander plus many other exciting OXPs HERE
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

Ramirez wrote:
CommRLock78, the specific check the OXP does for tournament eligibility involves looking up the subentities and running a crude check for anything turret-related:

Code: Select all

this.checkPlayerShip = function()
{	this.playerSubentities = player.ship.subEntities
	this.playerSubentitiesString = playerSubentities.toString();
	if(playerSubentitiesString.indexOf("turret") != -1)
	missionVariables.feudal_tournament_eligible = "FALSE"}
If you're familiar with the debug console, try typing in 'player.ship.subEntities' and see what that returns. There must still be a turret in there somewhere.
I'm not familiar yet - but it looks like between the quote of the day Ahruman told me about, an issue that I've had with Thargoid attacks on stations, and lastly the caddy with mysterious turrets are all pointing to it being time for me to learn the debug console.
Ramirez wrote:
As you'll probably appreciate, this bit of code is pretty much targetted at ships like the Caduceus, not only because of the turrets themselves but also because any ship capable of mouting turrets is likely to have fairly powerful stats that may make the tournament too easy.
Totally - one of the brilliant things about this game and its creators/contributors is that they keep it hard - Oolite is not meant to be easy. However, I'd rather crappify my caddy to the best of my ability than getting a whole other ship. Turrets are not honestly why I chose the ship (see this for that :D).

On another note - do you know of any compatibility issues with Griff's stations, namely:
griff_coriolis_normalmapped_alt_fullsize_tex_v2.03.oxp
griff_dodo_normalmapped_fullsize_tex_v2.01.oxp
Griff_Shipset_Addition_v1.22.oxp
Griff_Shipset_Replace_v1.34.oxp
Z_GrOovy_SML-Systemstations_1.0.oxp
Yesterday I had installed these oxps (previously, I had taken on a Feudal mission to disrupt some trading, which was still active), and the Phythons (if I recall) that were supposed to be carrying the cargo were never spawned when I arrived at the due system. The escort ships were there, but no cargo ships (and no * on the space compass). Sorry if this is known - I honestly haven't read the readme's yet, I just thought this was quite weird.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: The Feudal States

Post by Cody »

CommRLock78 wrote:
On another note - do you know of any compatibility issues with Griff's stations, namely:
Griff_Shipset_Addition_v1.22.oxp
Griff_Shipset_Replace_v1.34.oxp
You shouldn't have those two OXPs installed together - one or the other, with the Griff_Shipset_Resources_v1.2.25.oxp.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

El Viejo wrote:
CommRLock78 wrote:
On another note - do you know of any compatibility issues with Griff's stations, namely:
Griff_Shipset_Addition_v1.22.oxp
Griff_Shipset_Replace_v1.34.oxp
You shouldn't have those two OXPs installed together - one or the other, with the Griff_Shipset_Resources_v1.2.25.oxp.
This might explain another of the unsavory things that happened - the lasers seemed... well, different (choppy, I suppose is a good way to put it). Perhaps that will ensure a newly textured dodecahedron stations as well (since those didn't appear to be changed).

Thanks EV, I found the Resources, don't know why I didn't grab those to begin with. Hopefully that'll fix that issue, then I have to figure out why my caddy still has plasma turrets :) .

EDIT/Update: Reinstalled Griffs OXPs as well as the very important resources, and the new Feudal mission I started is working fine, so disregard this "problem" :D.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

I'm embarrassed to say, I can't figure out how to run the debug console [on Linux]. I've downloaded Debug OXP and the ZIP file with the python scripts. I made DebugConsole.py and pySimpleConsole.py executable, and tried running them in the terminal which gives

Code: Select all

$ '/home/robert/Downloads/DebugConsole/DebugConsole.py' 
bash: /home/robert/Downloads/DebugConsole/DebugConsole.py: /usr/bin/python^M: bad interpreter: No such file or directory
I have python 2.7 and 3 installed, so I'm not sure why it says no such file.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
fronclynne
Deadly
Deadly
Posts: 149
Joined: Sun Mar 01, 2009 5:36 am
Location: ::1

Re: The Feudal States

Post by fronclynne »

CommRLock78 wrote:
I'm embarrassed to say, I can't figure out how to run the debug console [on Linux]. I've downloaded Debug OXP and the ZIP file with the python scripts. I made DebugConsole.py and pySimpleConsole.py executable, and tried running them in the terminal which gives

Code: Select all

$ '/home/robert/Downloads/DebugConsole/DebugConsole.py' 
bash: /home/robert/Downloads/DebugConsole/DebugConsole.py: /usr/bin/python^M: bad interpreter: No such file or directory
I have python 2.7 and 3 installed, so I'm not sure why it says no such file.
Ha, it's searching for a python interpreter with a carriage return in the filename. This is generally considered poor manners & so it fails. You ought to remove the spurious carriage returns.

Try soemthing like

Code: Select all

dos2unix ~/Downloads/DebugConsole/*.py ~Downloads/DebugConsole/ooliteConsoleServer/*.py
If you don't have dos2unix, if you're on an apt-based system, like ubuntu or debian, you can get it with

Code: Select all

apt-get install dos2unix
or on gentoo

Code: Select all

emerge app-text/dos2unix
A few other methods in case you're not having fun yet: http://kb.iu.edu/data/acux.html

eidt: oh dear, typo in a filename. that won't do at all
User avatar
fronclynne
Deadly
Deadly
Posts: 149
Joined: Sun Mar 01, 2009 5:36 am
Location: ::1

Re: The Feudal States

Post by fronclynne »

Also, (assuming your unzip is similar to mine here) try running unzip with the -a option when you unzip files from other operating systems (as most OXPs & such will inevitably be):

Code: Select all

       -a     convert text files.  Ordinarily all files are extracted  exactly            
              as  they are stored (as ``binary'' files).  The -a option causes            
              files identified by zip as text files (those with the `t'  label            
              in  zipinfo  listings,  rather  than  `b')  to  be automatically            
              extracted as such, converting line endings, end-of-file  charac-            
              ters  and  the character set itself as necessary.  (For example,            
              Unix files use line feeds (LFs) for end-of-line (EOL)  and  have            
              no  end-of-file  (EOF)  marker; Macintoshes use carriage returns            
              (CRs) for EOLs; and most PC operating systems use CR+LF for EOLs            
              and  control-Z  for  EOF.   In  addition, IBM mainframes and the            
              Michigan Terminal System use EBCDIC rather than the more  common            
              ASCII  character set, and NT supports Unicode.)  Note that zip's            
              identification of text  files  is  by  no  means  perfect;  some            
              ``text''  files  may  actually  be binary and vice versa.  unzip            
              therefore prints ``[text]'' or ``[binary]'' as  a  visual  check            
              for  each  file  it  extracts when using the -a option.  The -aa            
              option forces all files to be extracted as text,  regardless  of            
              the supposed file type.  On VMS, see also -S.   
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

fronclynne wrote:
Ha, it's searching for a python interpreter with a carriage return in the filename. This is generally considered poor manners & so it fails. You ought to remove the spurious carriage returns.
:mrgreen: Thanks Fronclynne ! Changing the line endings (?) using dos2unix did the trick (even got a custom launcher in the mint menu 8) ).

Now, typing in 'player.ship.subEntities' gives me the following output:

Code: Select all

>player.ship.subEntities
[[Ship "Caduceus Engine" position: (-4.5, -0.5, -60.5) (subentity)],[Ship "Caduceus Engine" position: (-4.5, -0.5, -60.7) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 26) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 13) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 0) (subentity)]] 
I'm no expert, but it appears that the mounts are still there. Is is possible that there are more lines that need to be removed from the shipdata.plist file ? (For grins and giggles, I checked the player save file and it only returned about five entries with "caduceus" and none of them seemed to have anything to do with mounts or turrets).

Note: the code above from the debug console I had to type by hand, so there might be a typo in there - I'd love to know how to copy and paste things from the debug console if it is at all possible :D.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
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:

Re: The Feudal States

Post by Commander McLane »

CommRLock78 wrote:
Now, typing in 'player.ship.subEntities' gives me the following output:

Code: Select all

>player.ship.subEntities
[[Ship "Caduceus Engine" position: (-4.5, -0.5, -60.5) (subentity)],[Ship "Caduceus Engine" position: (-4.5, -0.5, -60.7) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 26) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 13) (subentity)], [Ship "Caduceus mount" position: (0, -2.6, 0) (subentity)]] 
I'm no expert, but it appears that the mounts are still there. Is is possible that there are more lines that need to be removed from the shipdata.plist file ? (For grins and giggles, I checked the player save file and it only returned about five entries with "caduceus" and none of them seemed to have anything to do with mounts or turrets).
Yes, that's what you wrote many posts above:
CommRLock78 wrote:
<I modified the shipdata> to:

Code: Select all

        <string>cenginea -4.5 -0.5 -60.5 1 0 0 0</string>
         <string>cengineb 4.5 -0.5 -60.7 1 0 0 0</string>
         <string>cmount 0.0 -2.6 26.0 1 0 0 0</string>
         <string>cmount 0.0 -2.6 13.0 1 0 0 0</string>
         <string>cmount 0.0 -2.6 0.0 1 0 0 0</string>
So the question is whether the "cmount" entities are turrets. It seems so, but a glimpse at their shipdata-entries will either confirm or contradict this easily.

CommRLock78 wrote:
I'd love to know how to copy and paste things from the debug console if it is at all possible :D.
It should work like c&p'ing anything else: select what you want to copy with your cursor, press CTRL-C, go to your browser typing window, press CTRL-V. :wink:
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

Commander McLane wrote:
So the question is whether the "cmount" entities are turrets. It seems so, but a glimpse at their shipdata-entries will either confirm or contradict this easily.
Are those to be found in the same file? (another reference perhaps ?). I will look at the file more closely tomorrow morning :D.
Commander McLane wrote:
CommRLock78 wrote:
I'd love to know how to copy and paste things from the debug console if it is at all possible :D.
It should work like c&p'ing anything else: select what you want to copy with your cursor, press CTRL-C, go to your browser typing window, press CTRL-V. :wink:
I actually tried both the standard context menu with the right mouse click and Ctrl+C and neither worked :(.
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
Ramirez
---- E L I T E ----
---- E L I T E ----
Posts: 628
Joined: Mon Nov 07, 2005 9:52 am
Location: London, UK

Re: The Feudal States

Post by Ramirez »

Your subentity output should be fine though. All the script is doing is turning that array into a string and searching for the word 'turret' - it's not looking up anything further in the shipdata.
Let me have a look tonight when I get back to my mac.
Download Resistance Commander plus many other exciting OXPs HERE
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:

Re: The Feudal States

Post by Commander McLane »

CommRLock78 wrote:
Commander McLane wrote:
CommRLock78 wrote:
I'd love to know how to copy and paste things from the debug console if it is at all possible :D.
It should work like c&p'ing anything else: select what you want to copy with your cursor, press CTRL-C, go to your browser typing window, press CTRL-V. :wink:
I actually tried both the standard context menu with the right mouse click and Ctrl+C and neither worked :(.
I haven't worked with the debug console (or Oolite, for that matter) on a PC, so it was only a guess.
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:

Re: The Feudal States

Post by Commander McLane »

Commander McLane wrote:
So the question is whether the "cmount" entities are turrets. It seems so, but a glimpse at their shipdata-entries will either confirm or contradict this easily.
I just had a look. No, they're not. At least not in the version of neocaduceus.oxp that I have on my computer (no version number, but a date-string of "141210"). Don't know whether that's the same you are using.

Therefore, you shouldn't currently have any turrets on your ship.
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

Commander McLane wrote:
At least not in the version of neocaduceus.oxp that I have on my computer (no version number, but a date-string of "141210"). Don't know whether that's the same you are using.
I was able to find the date-string on the original zip file, but, whilst looking at the shipdata.plist I stumbled across this, lines 75-80 (line numbers of the original file, not the one I've started to modify):

Code: Select all

   <string>caduceusturret 8.0 -2.7 26.0 1 0 -1 0</string>
         <string>caduceusturret 8.0 -2.7 13.0 1 0 -1 0</string>
         <string>caduceusturret 8.0 -2.7 0.0 1 0 -1 0</string>
         <string>caduceusturret -8.0 -2.7 26.0 1 0 1 0</string>
         <string>caduceusturret -8.0 -2.7 13.0 1 0 1 0</string>
         <string>caduceusturret -8.0 -2.7 0.0 1 0 1 0</string>
.
Never mind lines 331-336 or 670-677 which define turrets for what looks like NPCs.

The weird thing this is why the Debug console didn't recognize that there are still turrets, as it seems they are still defined in the shipdata.plist file and as I've witnessed them in action since "removing" them. Anyway, I'll remove this lines and fire up Oolite (holding right-Shift ;) ) and see what happens - wish me luck!
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
User avatar
CommRLock78
---- E L I T E ----
---- E L I T E ----
Posts: 1138
Joined: Sat Apr 07, 2012 7:35 pm
Location: US
Contact:

Re: The Feudal States

Post by CommRLock78 »

Update: I removed the additional lines, fired up Oolite and then picked a fight with a Galcop - and no plasma turrets ! :D Now I need to check the tournament and see if I can qualify :mrgreen:.

Thanks for the assist CML, it got me looking in the right place.
Ramirez - I'll keep you updated - there's currently a tournament on at Tibecea, but I'll need to work my way over there (I assume that I don't need to return to my liege at Ededleen to finish that mission before I compete).
"I'll laser the mark all while munching a fistful of popcorn." - Markgräf von Ededleen, Marquess, Brutal Great One, Assassins' Guild Exterminator
---------------------------
At the helm of the Caduceus Omega, 'Murderous Morrígan'
Post Reply