Need help from knowledgable modders

Hi all,

There is a function I want to make, but I'm not sure if Sins can be modded to do this.

When I capture a ship from another player, I would like to use an alternate entity file for the ship once it is captured.

Does anyone know if this is even possible, or how I might go about this?

Thanks for your help,
-Draven
9,188 views 11 replies
Reply #1 Top
#2 is not possible, but #1 most certainly is. One of the Advent support capitals has the ultimate ability Domination that does exactly that. ;) And you can peek into its entity file to see how it's done.
Reply #2 Top
I support Annatar's comment. So far, textures cannot be changed in game. But the ability already exists to take over ships.

DANMAN
Reply #3 Top
If you cannot change the entity file for the captured ship, is there a way to have the captured ship vanish and have a new ship spawn in its place that uses a different entity file? (Or spawn at the shipyard?)

Or....

Can there be a prerequisite for an item in the research tree that says you have to capture a particular ship?


Thanks,
-Draven
Reply #4 Top
I guess one possible work around would be to have the ability actually destroy the ship, and spawn the entity you want in its place. I doubt it would look good and you'd have to do something about the explosion and such.. but that's probably the only way to do it. It won't really be a true "capture", but it'll allow you to change the entity file.
Reply #5 Top
ah, if it came to that you could use the bright glare the cap ship upgrade uses to show when the special abilities are advancing. only make it green and last longer and maybe bigger to cover the ship change?

Reply #6 Top
Annatar,

That is an acceptable work-around. How would I code it so a new entity spawns in place of a destroyed ship?

-Draven
Reply #7 Top
If you cannot change the entity file for the captured ship, is there a way to have the captured ship vanish and have a new ship spawn in its place that uses a different entity file? (Or spawn at the shipyard?) Or....Can there be a prerequisite for an item in the research tree that says you have to capture a particular ship?Thanks,-Draven
End of quote


Ha, same train of thought :P Not sure I understand your question though. You can make a research prerequisite to unlock an ability, but you can't make usage of an ability a prerequisite to research.
Reply #8 Top
would it be possible that since a ship spawns debris on explosion to make a special debris on destruction with a certain weapon? debris that is the new ship?

ds
Reply #9 Top
I don't think there is a way to make a new ship spawn in the place of debris. (I could be mistaken about this.)


-Draven
Reply #10 Top
Annatar,That is an acceptable work-around. How would I code it so a new entity spawns in place of a destroyed ship?-Draven
End of quote


I have not personally done this, but I can point you in the right direction - AbilityIllusionSelfCopy and its corresponding BuffIllusionSelfCopyOnSelf. Basically, it's as simple as:

instantAction
buffInstantActionType "CreateFrigate"
instantActionTriggerType "OnDelay"
delayTime 0.000000
frigateType "FrigatePsiLongRange"
numFrigates
Level:0 1
Level:1 1
Level:2 1
matchOwnerDamageState TRUE
impulse 1000000.000000
expiryTime
Level:0 120.000000
Level:1 0.000000
Level:2 0.000000
spawnFrigateSoundID ""
postSpawnBuff "BuffIllusionSelfCopyOnClone"

where the frigateType is the name of the entity file you want to create. The only issue is I'm not sure if you can set it to pick an entity based on your target ship. So the ability may also be limited to spawning a specific type of ship only no matter what you "capture" in this manner :( You could probably randomize it a bit and have OnChance events that can randomly pick an entity to spawn.