Enhancing AI Ships

Started by Keeper Decagon, December 18, 2016, 07:16:16 AM

Previous topic - Next topic

Keeper Decagon

Is there a way to "Amp up" an AI ship with upgraded properties as if it were to have an Amp Gem equipped? (Not just talking fire rate here, since I know that can be upgraded, but more things like weapons range.)
"For me, there is no honour or glory. No praise to be had for what I do. I fulfill my purpose for the protection of all... neither of us are going to make it out of here alive." - ?? ??, 145th CE

Oblivion

grab the ships UID and set whether it has an ampgem to true?
~Memes have been scientifrically proven to be the very essence of life unto itself~

Sorrontis

Quote from: Oblivion on December 18, 2016, 10:19:45 AM
grab the ships UID and set whether it has an ampgem to true?
Could work. However, you can play with the properties (inherent energy, build rate, heal rate, fire rate) to have a similar effect except for the increased range.
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

Keeper Decagon

Quote from: Sorrontis on December 18, 2016, 10:26:02 AM
Quote from: Oblivion on December 18, 2016, 10:19:45 AM
grab the ships UID and set whether it has an ampgem to true?
Could work. However, you can play with the properties (inherent energy, build rate, heal rate, fire rate) to have a similar effect except for the increased range.

Indeed, though it's pretty much the range part I need. :P

Also, I'm pretty much the noobiest noob at coding. Haven't a clue how to grab a UID or anything really. I had a look on the wiki as well, and uh, I still don't have a clue about what and how and why and where. :/

I don't suppose anyone could give me an example?
"For me, there is no honour or glory. No praise to be had for what I do. I fulfill my purpose for the protection of all... neither of us are going to make it out of here alive." - ?? ??, 145th CE

GoodMorning

#4
To get ships:X Y Range 0 GetAllShipsInRange leaves a list of UIDs on the stack.

To get UID(s): list GetLstCount check this is gt 0, I.e. The list has something (here a UID) in it.list 0 GetListElement leaves you a UID

Now check ShipIsEnemy, and use SetShipHasAmp.

I don't have a real keyboard at the moment, if I did then I'd write the entire script here.

Edit: Now we're cooking with fusion! A real keyboard.

Let's see:

(We're only running this once, if you need a spawner's ships to be amped then it gets a little longer).

once
CurrentCoords 0.99 0 GetAllShipsInRange ->Ships
<-Ships GetListCount 0 do
<-Ships[I] ->Ship
<-Ship.ShipIsEnemy if
<-Ship 1 SetShipHasAmp #If the compiler chokes here, V has made the ship amping read-only.
endif
loop
endonce
A narrative is a lightly-marked path to another reality.

Keeper Decagon

I tried to give that script there a go, see if it would work, but the thing spewed an error back at me.

"For me, there is no honour or glory. No praise to be had for what I do. I fulfill my purpose for the protection of all... neither of us are going to make it out of here alive." - ?? ??, 145th CE

GoodMorning

In that case, I doubt that I can make it work. When we finish the wiki, we can be sure, but I think that it's not going to work in this form.
A narrative is a lightly-marked path to another reality.