The Thargoids are invading

General discussion for players of Oolite.

Moderators: winston, another_commander

User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Arexack_Heretic, I looked at your Thorgorn_Threat and saw that with just changing the roles to tharg* you are not there. The problem vessel you have now commented out. But if you add him with a new role, the tharglets won't attack him. But his tharglets wont work.

The tharglets are drones under control of a thargon mothership. As long they stay in scanning range with a thargon mother they will stay firing. When one mother dies, other mothers can take over control (Like modern apache choppers).

If you have a mother with a other role than thargoid, the drones will die immediately. So you can't just launch the system tharglets but you must program new ones with a new role and AI. Just copy the existing thargletAI, but change: scanForThargoid into scanForNearestShipWithRole: your role

Than your line about escorts. It is mentioned here before and probably you know but escort AI is set back to the default escortAI . In your Thorgorn_Threat you already defined a thargoidEscortAI but you must introduce a launch_actions in your escort and here again set your AI with : setAITo:

Things were not documented, but last week I added some of this to the Wiki. The two new pages are linked from the shipdata.plist page. One page with extra info about scripts within shipdata and one page with background info about the difference between adding ships by the system populator and those by scripts.

Specially the command setAITo: is rarely used but a lot of ships would be improved by the use of it. Take for instance the behemoth. It can be added by a script and than flies under a behemothAI, but can also be added in his role as hunter and then flies under a route1PatrolAI as thing are programmed now. (the difference in behavior between those two AI's however is very small and very few will notice it). With the setAITo command you can make sure that the ship always flies under the behemothAI.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
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 »

Thanks for looking into it E_W,
I have been busilly updating my OXPs the lst few days and have already done many of the things you suggested.

IIUYC, the 'scanForNonThargoid'method ignores roles starting with tharg*, while the 'scanForThargoid'method still scans for ships with only the role 'thargoid' ?


I don't want to switch from scanForThargoid to scanForNearestShipWithRole: tharg*, the reason being the native thargoids.

The new ships in th OXP have duplicates that have the singular role 'thargoid', I added a set of normal thargoids to prevent overrepresenting the new ones.

If I understand this correctly, the Thargon-missiles will reamin alive as long as there are ships around with roles 'thargoid' solved by having many ships with role thargoid.
and my friendly-fire problem with escorts is solved by adding tharg* in front of the roles of the escorts, which are roled thargoid-escort now.

Only leaves the problem of specificly roled ships not commanding tharglets. I had them commented out in the script before and nobody complained about it, so I guess I'll leave them out again. Untill such time as the scanForThargoid method also recognizes 'thargoid*' roles.
Riding the Rocket!
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

H_A wrote:
Only leaves the problem of specificly roled ships not commanding tharglets. I had them commented out in the script before and nobody complained about it, so I guess I'll leave them out again. Untill such time as the scanForThargoid method also recognizes 'thargoid*' roles.
Problem of the tharglets was that it was not clear what scanForThargoids and scanForNonThargoids exactly did. If you realize that the first only scans for a ship with role "thargoid" and the second scans for all roles starting with "tharg" the solution becomes easy. I send already some working scripts in a private message, but here for the benefit of us all:

Look at the basics. Tharglets are only under control of ships with role thargoid. So if you introduce a new thargoid role you also must define new matching robot fighters. Lets call them: "tharglot"

I took the ship from your oxp with role thargorn. I changed the missile role from tharglet into tharglot.

Then I defined a new ship with name tharglot.
With the like_ship: tharglet I created a copy of the tharglets. then roles: tharglot, ai_type: tharglotAI.plist

All we need now is a new AI. Copy the thargletAI from within Oolite to your oxp and call it tharglotAI.plist

There are two places within the script were the control is checked. Change the two occurrences of scanForThargoid into "scanForNearestShipWithRole: thargorn"

That's all. Things are working on my computer.

You can do the same with the other custom thargoid roles as long as you make sure all your thargoid roles start with "tharg"
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
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 »

calling all ships with the role thargoid works too. ;)
Riding the Rocket!
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

@Arexack_Heretic:
I'm not sure if I'm seeing the same bug you mentioned on page 2 or not...
When loading Thargorn_Threat.oxp (on the PC) oolite fails to load and the stderr.txt reports:

2007-10-16 22:18:55.000 oolite.exe[676] [plist.parse.foundation.failed]: Failed to parse AddOns/Thorgorn_Threat.oxp/Config/shipdata.plist as a property list using Foundation. Retrying using homebrew parser. WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite.
Parse failed at line 1 (char 1) - extra data after parsed string

2007-10-16 22:18:55.000 oolite.exe[676] [plist.homebrew.success]: Successfully interpreted property list... for now.

2007-10-16 22:18:56.000 oolite.exe[676] [script.load.world.listAll]: Loaded 19 world scripts: "Behemoth-script01", "behemoth-spacewar", "Cargo_test", "deposed", "elite_monument", "oolite-cloaking-device" 1.69.1, "oolite-constrictor-hunt" 1.69.1, "oolite-nova" 1.69.1, "oolite-thargoid-plans" 1.69.1, "oolite-trumbles" 1.69.1, "Put_Pirate_Coves_where_the_pirates_are", "thargoid_wars", "thargoid_witchspace_test", "ups_container", "ups_docs", "ups_parcel", "ups_slaves", "ups_sun", "wedding"

As you can see it's not in the list of successfully loaded OXPs.

I downloaded it from the link on the wiki just yesterday so I guess it's the latest version?

Do you have any ideas/advice? Or should i just play on without it and let the thargons get wasted by all the behemoths? :)

Thanks.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
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 dont recall uploading the fixed version yet... I was playing around with some problems still.
However as this bug prevents people using 1.65< from playing, I'll upload the version I have currently on my drive.

Also I've become distracted with other stuff again, so I'd better upload it.

So my advice is: upgrade to v1.1. :)
Riding the Rocket!
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

great thanks :)
Post Reply