[Script]RS.Turret Defence

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

helias126
Posts: 17
Joined: Thu, 24. Aug 06, 14:14

Post by helias126 »

RS, is it possible to do a script that assigns the None Command in all turrets with a hotkey and Attack all enemies with another hotkey?
Is very hard to cap any ship cause its dead before i can blink :lol:
Also many times i want to dock a Pirate station not shoot it damn it!!
This has nothing to do with your script ofc.
I am using XTM and flying a Terran Vidar (Amazing M6M) :D
Keep up the great work :)
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

not only poss. but already made ...
however this will be an "FC" feature ..

(FC == Fleet Command)


G
Scoob
Posts: 11170
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Hi RedSpot,

Great script :-)

Quick question though if I may...

I've done a personal mod to change the refire rate of certain weapons in the game, this works fine except for turrets controlled by this script which still seem to fire at the default rate.

I've had a little look through the scripts using the builti-in script editor but can't seem to find anywhere where these rates are coded, could you point me in the right direction please?

Thanks.

P.S. it is sorta cool that my ships have double the ROF of anything else, but a little unbalanced :-)
Dragie
Posts: 4
Joined: Thu, 26. Jan 06, 09:06
x4

Post by Dragie »

Hi Red Spot
this is my first post,
A question for you, is this script compatible with V2.02?
User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk »

RS, what lines to comment out (or w/e) to stop the turrets from switching weapons, i hate seeing my turrets switch from bPAC to aPPC when fighting a M5/M4/M3/TS/TP, since it's not the most appropriate weapon to use against them IMHO.

I rather leave the weapons management to myself, or use exclusive rules (i.e if ship == M1 OR ship == M2 OR ship == M6 OR ship == TL, switch to a/b/gPCC, if ship == drone, switch to a/bIRE).

Anyhow, nice script, maybe considering SPK-ing it ?

Cheer-ios
Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 »

If you don't want your ships swapping weapons, don't use the script (uninstal it).

The whole idea for this script is for the player to get the SAME (or similar) weapon switching capabilities as the NPC's have.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

Scoob wrote:I've done a personal mod to change the refire rate of certain weapons in the game, this works fine except for turrets controlled by this script which still seem to fire at the default rate.

:gruebel: ... I read something like this a few days ago (cant recall if this was you as well or not) but someone reported that changing the RoF doesnt seem to work ...

there could be several possible answers here I guess;
-you didnt actually change RoF
-the way I code fire-logic works it way around the RoF (could alow for some funky behaviour if so, think a weapon firing fast on cap. ships but slow on fighters, etc etc)
-engine-flaw

anyway hope you can understand that I'm currently not developing just scripts but something much much bigger and therefor am not about to temper with this as scripting is now kinda like stage16 where I'm now at stage1 of development ...... :roll:
(add ~6 months from today and I might again be pounding keys ...;))



Dragie ...


Have you tried it in v2.# ??
When you do you'll get your answer quick enough ...;)



Sesk ..


about 1/2 the script ... :roll:

anyway this is just a basic script that allows some weapon-changing and energy-managment and is based around basicly those 2 things (together with a bit of combined-targeting)
want a basic script without weapon-changing than I suggest you enter your turrets command section and try any of the scripts you can see there in a vanilla game ......
(or learn how to script and start pounding keys ..;))


please note I dont do requests (anymore .. for several good reasons :!: )
however if someone shows he's really trying but cant get there I generally dont mind helping out a bit, but I wont build/alter scripts just because a complete stranger wants stuff ...



G
User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk »

Well, i'm not requesting anything, i'll do w/e i want myself and not bother anyone unless i don't understand how they procceded, or saying that it is too complicated or anything, but if i resume my previous post and clean it up abit, it's something like this:

Why gun [switch to] 'PPC' + shoot > fighters :gruebel:

Anyway i'll check the script tomorow and see what makes it tik, i was just wondering what part of the script managed the weapons and made them switch, and what could i do about it.

BTW do you know a out-of-game script editor or is this hopeless for standalone editor ?
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

Sesk wrote:Well, i'm not requesting anything, i'll do w/e i want myself and not bother anyone unless i don't understand how they procceded, or saying that it is too complicated or anything, but if i resume my previous post and clean it up abit, it's something like this:

sorry but I dont believe you ...

I'm close to 100% certain that IF you looked at the script you wouldnt have asked me this question wich means its kinda what I'm saying
"people ask you to do stuff cause they rather have someone else do it"

you rather have me tell you what makes my script tik before actually having a good look at it, wich is something I'm not about to do ..
(actually .. within this topic alone I already kinda said how its works several times ...)



G
User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk »

wow i don't think you realize that i posted that thing at 4 am eastern time, i didn't have the time to go play X3 and look at your script but anyway if you don't want to believe me i don't give a **** you can just go back to w/e you where doing, i've got the script here and the MSCI Handbook, which is all i need at this point. If you didn't' understand what my posts meant, and you're just thinking that im asking you to do something, you dead wrong.
Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 »

@Sesk

You don't WANT an autoswapping script. You've pretty much said so. So blowing up like that to RS is a big nono.

Since RS's script doesn't do what you want, write your own. Don't copy any parts of his (or anybody elses) scripts, write your own, from scratch. Come back in 3 months and give us an update on how poorly your making progress.

You don't come into the forums with a 'You WILL help me' attitude. You will find that we don't put up with it.

And by the way, that copy of MSCI you have? Was written for X2. It's still useful for X3 scripting, but it is missing alot.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©
User avatar
Sesk
Posts: 441
Joined: Fri, 17. Nov 06, 21:09
x4

Post by Sesk »

You don't WANT an autoswapping script. You've pretty much said so.
You misunderstood me, which is understandable, i want an autoswapping script, but if it bugs and autoswapps to a PCC gun to shoot fighters, i rather not have a buggy one.
Come back in 3 months and give us an update on how poorly your making progress.
You saying im stupid ? I'm sure that everyone puts up with this. Either way, 3 months to make a turret script is saying someone is darn stupid or doesn't invest enought time in it.
You don't come into the forums with a 'You WILL help me' attitude. You will find that we don't put up with it.
I don't come in forums with that attitude, if no one wants to help me fine, w/e, but you just think i have that attitude because A.) You didn't read/understand my posts or B.) I didn't express myself in the correct way.

But anyway if you want to argue about anything in this post, or in any other post of mine in this tread, or in other treads, or anything concerning me or my 'attitude', or if you want to say anything to me, just PM me instead of spamming this tread with out of topic posts.

BTW MSCIHB, it's not uptodate for X3 ,but never the less, it's the only scripting handbook i could find in these forums, and can still be usefull.
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

Sesk wrote:wow i don't think you realize that i posted that thing at 4 am eastern time, i didn't have the time to go play X3 and look at your script but anyway if you don't want to believe me i don't give a **** you can just go back to w/e you where doing, i've got the script here and the MSCI Handbook, which is all i need at this point. If you didn't' understand what my posts meant, and you're just thinking that im asking you to do something, you dead wrong.

let me try and explane a few things here;

-posting at whatever time or condition is up to you and not something I'll take in consideration when I post replies, or do you think I'll start figuring out where every poster lives and what the time was over at his place when he posted things ?

-replying to me with words that automaticly by the site get replaced with nothing but "*" isnt going to get you any help, wether you are actually act before ask or not

Sesk wrote:You misunderstood me, which is understandable, i want an autoswapping script, but if it bugs and autoswapps to a PCC gun to shoot fighters, i rather not have a buggy one.
first of all there is a big diff. between whats bugging you and what is buggy, next to that I'd remember what I say if I where you as in a previous post you say you like the script and now when you can get the help when you ask it all of a sudden is buggy ..... :roll:

Sesk wrote:You saying im stupid ? I'm sure that everyone puts up with this. Either way, 3 months to make a turret script is saying someone is darn stupid or doesn't invest enought time in it.
Thanks! for calling me stupid! ;)
took me about 3 months if not longer if I take all time spend on turret-scripts together




G
User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut »

I removed weapon switching from this script in about 15 minutes... :roll:

Also, it's kind of hard to write a script that conserves energy on your turrets without copying RS's script. The script just uses interrupts and the way that they are put together, it's almost impossible to duplicate the effect without copying. The script itself isn't really genius or anything, it's just simple and functional.

I have two versions of RS turret script I personally use, one that targets fighters and one that targets cap ships, and they both don't use weapon swapping. It's pretty easy to make one on your own.
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

vampirecosmonaut wrote:I removed weapon switching from this script in about 15 minutes... :roll:

Also, it's kind of hard to write a script that conserves energy on your turrets without copying RS's script. The script just uses interrupts and the way that they are put together, it's almost impossible to duplicate the effect without copying. The script itself isn't really genius or anything, it's just simple and functional.

I have two versions of RS turret script I personally use, one that targets fighters and one that targets cap ships, and they both don't use weapon swapping. It's pretty easy to make one on your own.

-why I dont explain how it works, it would take me twice as long to explain as it takes to "learn" ...

-imo your wrong there, as is I've got several methods of getting there, there is just a basic number of checks that will stay the same ...

-turretscripts in its basics are very easy, the only fine thing is the interrupts .. mess up there and a perfectly fine script might not even work ....

-your right, no where near genius .. but as long as I'm about the only one playing with interrupts (at least afaik) I wouldnt hold my breath untill someone else comes up with something similair ...
(dont mind saying it again .. script can get made or broken by their interrupts .. specially so on turret and combat -scripts ..)

-"It's pretty easy to make one on your own." ... you mean its easy to "copy" one on your own ...:P;)



G
User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut »

Red Spot wrote:"It's pretty easy to make one on your own." ... you mean its easy to "copy" one on your own ...:P;)
Whatever, I don't find you all that impressive.
I was just encouraging others to just make their own changes to your script for thier own personal use.

I really don't see the point of writing a whole new script just so I'm not copying parts of yours. If it does what I want I'm going to use it.

Other scripters allow parts of thier scripts to be used and copied, that's how modders work together. If you're content to not share and sit on your work, it doesn't bother me all that much, it just makes you look like a prick.
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

:lol:

-seems you do .. you do keep coming back to take my work ....

-never said people should, those are your words ...
anyway that taking behaviour just shows how much respect you have for others and the time they invest in something they end up sharing with the public (no-one holding a gun to my head ...)

-no .. that how you like it to work .. next to that you know nothing, nothing at all when it comes to my work and contact with others so you have no idea what you are talking about ...

-seems it does bother you, else you wouldnt take the time to reply ...
anyway merry X-mas dickhead ..;)



G
Jakesnake5
Posts: 2880
Joined: Fri, 17. Feb 06, 04:55
x4

Post by Jakesnake5 »

/me drops a 5 tonne 'CLUE' on Vampire, and see's it has no effect.

If it doesn't do what you want, right out of the box, why are you complaining? You can adjust it yourself, to do things the way you want.

OR

You can write your OWN script, that behaves exactly how you like. That means not copying anything from RS's scripts.

Myself, I've created a couple scripts using others as a basis, because they were close to what I wanted to do. I asked them permission to use them, and always got that permission. I also recognize their efforts by telling the source of those scripts functioning (ie: identifying the authors of the source scripts). :D

Your attitude is rather odd though. You say you 'like' the scripts, but then state they don't 'do what you want'. This kind of contradictory behavior requires medical supervision. :o

And the name calling is a bit childish. It also doesn't belong in the forums.

I like and use RS's script. It does what I expect it to do since I KNOW what it's supposed to do. I did create a slightly altered version, that uses a 'new' turret slot, so I still have Attack Enemies default behavior, and the .adv turret behavior (similar to the NPC variant) that his script provides. I can choose between them. But it's still RS's scipts, modification or not.

Without his script, I wouldn't have the autoswitching/power balancing abilities for my ships. AEGIS isn't ready (and I don't think its being worked on anymore), so TD is my choice.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
[ external image ]
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©
User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut »

@Jakesnake5
I have no idea what you're talking about or who you're talking to.
Dropping a 5 ton clue? I do not understand that statement.
Also, mind your own business and the language was warranted.
Finally, I think you might be confusing me with Sesk.

@Red Spot
I originally went about asking you for help with my script and to use some of your script in a respectful and polite manner. You brushed me aside and acted in a disrespectful way. And as far as your claim that I keep coming back to take your work... only one thing you have done interests me, this script. Also, you've been pretty much trolling me with our every conversation. So, whatever really, I was just trying to help Sesk out in this topic. Oh yeah, Merry Christmas to you too. :D
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.
User avatar
Red Spot
Posts: 3461
Joined: Fri, 4. Feb 05, 13:44
x3

Post by Red Spot »

Jake ..


Thanks for .. er .. taking my side, but please dont ..
It isnt going to be effective anyway (besides I've .. er.. been playing around ....)

Next to that I've decided to change my "upload behaviour" wich means my public site will go and some script will find their way to my private-site wich to some (like you) is accesable on request ...
I will also simply (if I ever will publicly release a script at this forum) not release the readable part but just the code-array .. to bad as it makes it that in general no-one can enjoy them of perhaps even learn from them, but its a price I gladly pay in order to be released of this general "I want, you will" and "once released its public property" behaviour ....

So if you need anything you just drop me a PM ..;)



G

Return to “X³: Reunion - Scripts and Modding”