Page 5 of 7

Posted: Mon Feb 16, 2009 12:40 pm
by Ark
dima wrote:
would it be possible for me to alter the script so that the missions are offered on any normal station?
Not only the script but also the AI of the mission ship

Posted: Mon Feb 16, 2009 1:00 pm
by dima
Oh right I see, after all it has to start/dock somewhere. Ah, I was just dreaming away it wouldn't be any "complex" at all :(

Posted: Mon Feb 16, 2009 1:04 pm
by Eric Walch
Ark wrote:
dima wrote:
would it be possible for me to alter the script so that the missions are offered on any normal station?
Not only the script but also the AI of the mission ship
Not advisable. That oxp is incompatible with a lot of other mission oxp. It will overwrite other screens. Now this is not a big problem as it only offers at its own station and overwrites only offer made at the pi-42 station. With offering at all stations it needs a lot more testing code to avoid clashes with all regular oxp's.

Posted: Mon Feb 16, 2009 1:06 pm
by dima
Eric Walch wrote:
Not advisable. That oxp is incompatible with a lot of other mission oxp. It will overwrite other screens. Now this is not a big problem as it only offers at its own station and overwrites only offer made at the pi-42 station. With offering at all stations it needs a lot testing more code to avoid clashes with all regular oxp's.
Right, scratch that.

Hm, sorry for bothering you so much with this and making so many posts about it but hmm.. escorts!! yay!! want'em!! :D Maybe I can find some workaround until an updated version gets released.

I just downloaded the Your Ad Here oxp, too and wonder if I can alter this to only spawn these necessary Pi-42 constores whenever it tries to spawn different versions. This would loose variety but I would be able to get escort missions. And actually I wouldn't want stores like "Mall-Wart" in the game (too many real life references...)

And I found one of your script modifications interesting:

Code: Select all

conditions = (   "dockedStationName_string oneof Pi-42 Con Store, Tescoo Con Store, Mall-Wart Con Store, Star Con Store, Sainsboory's Con Store" );
Wasn't this successful? If I change these conditions everywhere in the script, what problems will remain?

And if all this does not work - how rarely are those specific Pi-42 constires being spawned actually Smile

Posted: Mon Feb 16, 2009 3:58 pm
by Ark
Eric Walch wrote:
Ark wrote:
dima wrote:
would it be possible for me to alter the script so that the missions are offered on any normal station?
Not only the script but also the AI of the mission ship
Not advisable. That oxp is incompatible with a lot of other mission oxp. It will overwrite other screens. Now this is not a big problem as it only offers at its own station and overwrites only offer made at the pi-42 station. With offering at all stations it needs a lot more testing code to avoid clashes with all regular oxp's.
Do not worry Eric I do not intend to do anything like that. Escort missions for the oohaul ship traditionally offered on constores and I am going to keep it that way and since constores only offer you those escort missions there is no promblem at all

Code: Select all

conditions = (   "dockedStationName_string oneof Pi-42 Con Store, Tescoo Con Store, Mall-Wart Con Store, Star Con Store, Sainsboory's Con Store" );
The above modification is successful. The oxp has more problems that have nothing to do with the missions so I am still working on it. The problem is that the 3 containers that the ship has do not spawn cargo if you destroy them probably because the spawn command in the death actions of a subentity does not work anymore even with the use of JS but A_C has just found me an acceptable solution. that has nothing to do with the escort missions unless you want destroy and loot the ship that you protect :evil:
The conditions are more than 32 kills and 20% chance of a mission offering every time you dock in a constore. Without the above modification is 20% on Pi-42s with the modification 20% on every constore
dima wrote:
I just downloaded the Your Ad Here oxp, too and wonder if I can alter this to only spawn these necessary Pi-42 constores whenever it tries to spawn different versions.
There is no need to alter anything just keep only the set_A that has the Pi-42 constore. That way all the constores will be pi-42s

Posted: Mon Feb 16, 2009 4:40 pm
by dima
Ok, I added the conditions = ( "dockedStationName_string oneof Pi-42 Con Store, Tescoo Con Store, Mall-Wart Con Store, Star Con Store, Sainsboory's Con Store" ); line to replace the conditions with only one string set. I also found several other parts with the string "Pi-42 Con Store" and added Tescoo Con Store etc. there, too. To test it, I removed the requirements for a mission to appear and it's working :D On every Con Store I enter and everytime, very nice ;) Thanks for helping me out with this. Escort missions, how great is that...

Posted: Mon Feb 16, 2009 5:29 pm
by Eric Walch
Ark wrote:
...The oxp has more problems that have nothing to do with the missions so I am still working on it. The problem is that the 3 containers that the ship has do not spawn cargo if you destroy them probably because the spawn command in the death actions of a subentity does not work anymore even with the use of JS but A_C has just found me an acceptable solution. that has nothing to do with the escort missions unless you want destroy and loot the ship that you protect :evil: ..
There are more flaws in the original code. Maybe you noticed already but at

Code: Select all

conditions = ("status_string equal STATUS_ENTERING_WITCHSPACE")
scripts are never executed so this condition will never happen. Change this into: STATUS_EXITTING_WITCHSPACE. It will run a few moments later on jumping, but the code will be executed that way.

Posted: Mon Feb 16, 2009 5:39 pm
by Ark
Thank you Eric :D
Can you also tell me why the pi-42sandwichboardAI is not working anymore :roll: :lol: :lol:

Posted: Mon Feb 16, 2009 5:58 pm
by dima
Mh, I also recognized that the escort missions do not appear in any of the screens. However, I definitely signed the contract and escorted the ship etc. Is that normal?

Posted: Mon Feb 16, 2009 7:01 pm
by Thargoid
Eric Walch wrote:
There are more flaws in the original code. Maybe you noticed already but at

Code: Select all

conditions = ("status_string equal STATUS_ENTERING_WITCHSPACE")
scripts are never executed so this condition will never happen. Change this into: STATUS_EXITTING_WITCHSPACE. It will run a few moments later on jumping, but the code will be executed that way.
One quick question, does both STATUS_EXITTING_WITCHSPACE and STATUS_EXITING_WITCHSPACE work? I ask as I would normally spell it with one T in the middle word (as in the second example), but the wiki contains both spellings on different pages.

I wouldn't normally be so impolite as to correct spelling (especially for someone making the effort to use a non-native tongue), but here it could be important if the engine only recognises EXITING (for example). It could be something that needs correcting sometime in the wiki?

Posted: Mon Feb 16, 2009 8:07 pm
by Kaks
Hi thargoid,

indeed the code looks only for STATUS_EXITING_WITCHSPACE, unfortunately we can't change the wiki as yet...

Posted: Mon Feb 16, 2009 8:18 pm
by Thargoid
Thanks. I know regarding the wiki, hence the "sometime".

Posted: Mon Feb 16, 2009 8:28 pm
by Kaks
Ooops, another slip of the fingers! In my head it was 'unfortunate we can't change the wiki as yet...' :)

Posted: Mon Feb 16, 2009 10:12 pm
by Eric Walch
Ark wrote:
Thank you Eric :D
Can you also tell me why the pi-42sandwichboardAI is not working anymore :roll: :lol: :lol:
It is not working because an old bug was removed. To broadcast something, a ship needs to have a pilot. Till recently Oolite put even pilots in billboards and missiles and the like.

Two solutions:
1) change in the AI: "commsMessage:" into "commsMessageByUnpiloted:"
2) add to your shipdata the key: "unpiloted = no".

1 is the most clean code. It will however only work with Oolite 1.72+
2 is reintroducing the "bug" by adding a pilot to your billboard. This code will than work on old and new oolite. But it is only bothering a few that the billboard has a pilot inside. In Oolite there is no union for exploiting pilots that forbids to put them in small spaces with no outside view.

Posted: Mon Feb 16, 2009 10:39 pm
by DaddyHoggy
In the case of Tetra-Screen PLC though - pilot = a trumble with it's neural pathways wired directly into the tumble attitude thrusters of the advertising screen... :wink: