My generous bug

News and discussion of the PC port of Oolite.

Moderators: winston, another_commander

User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

@Little Bear:

This gets really weird now. I was sure that the role of pirate would only have a 1% chance in the NPC constrictor entry of ever happening, and as about 300 ships in there could be selected as pirates, that meant that the chance to find a pirate constrictor in a given system would be about 1:100, sending the danger of meeting two constrictors when ending the mission to virtually nil. But I was wrong. Know what I found?

It looks like this:

Code: Select all

<key>roles</key>
                <string>constrictor</string>
That`s a massive bug. If I`ve not gone completely mad (people have claimed that, but that`s another topic) that means that the pirate constrictor should never had appeared in the game due to this bug ...

Ultimately weird. And demands another step in my hand-applied patch, or the constrictor is going to not appear again ever ... or not?

Confused :?

L
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
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 »

On my install you have:-

Code: Select all

<key>constrictor</key>
        <dict>
                <key>ai_type</key>
                <string>pirateAI.plist</string>
                <key>bounty</key>
                <integer>250</integer>
                <key>cargo_type</key>
                <string>CARGO_NOT_CARGO</string>
                <key>death_actions</key>
                <array>
                        <string>set: mission_conhunt CONSTRICTOR_DESTROYED</string>
                </array>
                <key>energy_recharge_rate</key>
                <real>16</real>
                <key>exhaust</key>
                <array>
                        <string>0.0 0.0 -38.0 27.0 18.0 18.0</string>
                </array>
                <key>forward_weapon_type</key>
                <string>WEAPON_MILITARY_LASER</string>
                <key>fuel</key>
                <integer>60</integer>
                <key>has_ecm</key>
                <true/>
                <key>has_escape_pod</key>
                <false/>
                <key>has_fuel_injection</key>
                <true/>
                <key>has_scoop</key>
                <false/>
                <key>launch_actions</key>
                <array/>
                <key>max_cargo</key>
                <integer>15</integer>
                <key>max_energy</key>
                <real>450</real>
                <key>max_flight_pitch</key>
                <real>1.75</real>
                <key>max_flight_roll</key>
                <real>2.5</real>
                <key>max_flight_speed</key>
                <real>600</real>
                <key>max_missiles</key>
                <integer>3</integer>
                <key>missiles</key>
                <integer>3</integer>
                <key>model</key>
                <string>constrictor_redux.dat</string>
                <key>name</key>
                <string>Constrictor</string>
                <key>roles</key>
                <string>constrictor pirate (0.01)</string>
                <key>thrust</key>
                <real>50</real>
                <key>weapon_energy</key>
                <real>30</real>
                <key>weapon_offset_x</key>
                <real>0.0</real>
        </dict>
So it also has the role pirate. There is also a space between "pirate" and "(0.01)". I'm not 100% on this but this may mean the (0.01) is not being used. IE Oolite is treating (0.01) as another custom role and so it has the same chance being chosen as a pirate as any other. Although you've probaley got about 300 odd ships with the role pirate, when you bear in mind many OXPs (eg Pirate Coves - Deep Space Pirates etc) add pirates over and above the default amount, if there's an average of 20 pirates a system it'll appear on average every 15 jumps or so. Which seems to be whats happening.

Also you need to remove the role constrictor and just have.

<key>roles</key>
<string>pirate(0.01)</string>

ATM there is a 50 : 50 chance that your Clone will be added INSTEAD of the real constrictor by the mission script. Once you've removed the death_actions from the clone, it will introduce a bug into the Mission whereby half the time the player kills the constrictor he's not rewarded.
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
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Post by Lestradae »

LittleBear wrote:
Also you need to remove the role constrictor and just have.

<key>roles</key>
<string>pirate(0.01)</string>

ATM there is a 50 : 50 chance that your Clone will be added INSTEAD of the real constrictor by the mission script. Once you've removed the death_actions from the clone, it will introduce a bug into the Mission whereby half the time the player kills the constrictor he's not rewarded.
So ... removed the space between "pirate" and "(0.01)".

@bug into the Mission: Don`t think so, for I not only say to take out the death_actions, but also the role of "constrictor" while changing the name to "NPC constrictor" ... so, the NPC pirate constrictor is essentially treated as a different ship with the same stats and graphics as the mission constrictor by the game - or am I missing something?

Also strange that in your install the roles line looks like I remember, but don`t have in my own install ... :?

Am I really missing something?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
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 »

It'll have a different KEY, but will still have the role constrictor, so if you left constrictor in the ROLES then changing the key won't help. If you look at RH for example I have about 50 different KEYs for different bounty hunters all with the role random_hits_patrol. Whenever my script launches a ship with the role random_hits_patrol it may launch any one of the 50 odd varients. This is intended so there is a variety to the different bounty hunter ships launched by the space bars. If you have TWO entries which both have the role constrictor (even if they have different keys), then its 50 50 whether your clone or the orginal will be added by the native script. But just taking out the role of constrictor will stop that.

I expect you've fixed the bug on your own install but not yet updated the download version. Done that myself many a time!
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
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

...

Post by Lestradae »

It'll have a different KEY, but will still have the role constrictor, so if you left constrictor in the ROLES then changing the key won't help.
I think you overlooked this here ...
9. Search for the following following further below:

Code:
<key>roles</key>
<string>constrictor</string>

... and replace with:

Code:
<key>roles</key>
<string>pirate(0.01)</string>
... in my Expansion Forum posting.
I expect you've fixed the bug on your own install but not yet updated the download version.
I fear this to be correct. Hopefully there are not a lot of other things like that ...
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

would´nt it make sense to: completely remove the death actions ???...

since this is now not the mission constrictor, those make no sense... or did i miss something...

in the odd chance that the NPC-constrictor is spawned, and killed in the same system as the player... will that not retrigger the bug...

just my 2 cents

copied this reply to your bug thread
Bounty Scanner
Number 935
Post Reply