Determin hostility by comparing sovereigns?

Freeform discussion about anything related to modding Transcendence.
Post Reply
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Let's say we have a station. It is in another system so (objIsEnemy) won't work, but we have its sovereign. Is there a function to check if that sovereign is hostile to the sovereign of another object, say the player?

If not, is there any other data that could be used to check if it is hostile? (but it is still not in the same system, else I might as well just use objIsEnemy, or perhaps objIsAngryAt)
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

I think this would be good to have.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

What you could do for a workaround is spawn a ship with the sov you want and then use objIsEnemy and then destroy the ship. I agree that a new function (sovGetDispostion sov1 sov2) would be nice to have. Perhaps add it to the tracker and George may consider adding it.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

But to do that you'd stil need to know the sov ahead of time; thus you can't simply pull it from the object and then spawn the dummy; you'd have to have pre-recorded it.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

I think Bobby asked what to do if you had the sovereign, but not the object around. (sovGetDisposition sov1 sov2) would be a great addition.

At this point I would do what Prophet recommends. Make a function local to your mod that mimics sovGetDisposition but uses ship spawning to find the disposition, and swap it out with the real one if we get George to add it in.
Last edited by alterecco on Sun Aug 22, 2010 4:23 pm, edited 1 time in total.
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

alterecco wrote:I think Bobby asked what to do if you had the sovereign, but not the object around. (sovGetDisposition sov1 sov2) would be a great addition
Ah ok.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Wolfy wrote:
alterecco wrote:I think Bobby asked what to do if you had the sovereign, but not the object around. (sovGetDisposition sov1 sov2) would be a great addition
Ah ok.
Wow, sniper!! :)
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

:lol: Yeah, I have nothing better to do right now.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Wolfy wrote::lol: Yeah, I have nothing better to do right now.
How about you finish the Ranxy Adventure extension and then get back on the Sandbox extension :)
Image
Image
User avatar
Arisaya
Fleet Admiral
Fleet Admiral
Posts: 5535
Joined: Tue Feb 05, 2008 1:10 am
Location: At the VSS Shipyards in the frontier, designing new ships.

I'm waiting for george to respond to more PM's.
(shpOrder gPlayership 'barrelRoll)

<New tutorials, modding resources, and official extension stuff coming to this space soon!>
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Spawning dozens or hundreds of ships (one for every station in the system, and in past systems) every time I want to display something just seems wrong.

What I think i'll do is use objIsEnemy on stations in the system to build up and maintain a list of hostile sovereigns, then check the recorded station sovereign against that.
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

BTW: I thought sovGetDisposition was already implemented. Doesn't it do what you guys are looking for?
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

There's a sovGetDisposition? it wasn't on Xelerus or the wiki. I'll try it out right now.

EDIT: it works, thanks George!

Anyone care to add it to Xelerus and/or the wiki?
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

(sovGetDisposition sovereignID targetSovereignID) -> disposition of sovereign to target
(sovSetDisposition sovereignID targetSovereignID disposition)

Bobby, sorry, we have been a bit lazy with the Xelerus function list.
You can find the unfiltered function list for 1.02 here:
http://www.neurohack.com/transcendence/ ... php?t=3175

we also have sovSetDisposition on the wiki (easy to reach from the main function Index http://wiki.neurohack.com/transcendence ... ions/index)
http://wiki.neurohack.com/transcendence ... isposition
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Ugh, that one was embarrassing :oops:

*Goes to have his memory checked*
Post Reply