Warning Shots

A place to discuss mods in development and concepts for new mods.
Post Reply
User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

Sun Nov 30, 2014 7:09 pm

Is it possible to make enemy ships miss on purpose? I'm trying to set up an encounter, but for it to really be effective the enemy ship has to shoot near the player (but making sure it does not hit the player) before the player can see what he/she is up against.
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."

User avatar
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Mon Dec 01, 2014 4:02 am

You can use sysCreateWeaponFire to create the appearance of warning shots.

In your script before you encounter the player, just use sysCreateWeaponFire and mess with the direction so that the shots miss the player but are still visible.

Function syntax:
(sysCreateWeaponFire weaponID objSource posVector dir speed objTarget [detonateNow] [weaponBonus])
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.

User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

Mon Dec 01, 2014 11:52 pm

Okay, thanks!

Also for same scenario, is it possible to give a specific area on the map a label without attaching it to anything? That is a specific station, ship, etc.
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."

User avatar
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Tue Dec 02, 2014 1:26 am

You can also kludge that by making an invisible station with a 1 pixel by 1 pixel image and naming it something, then setting it as a world so the map image isn't too big. Then spawn it with SysCreateStation at the right place on the map. You can also then move the label by moving the station with ObjMoveTo.

There might be another way but that's what I have off the top of the head. You might have to play with a lot with xml settings on your invisible station though so you don't get the green box on the map.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.

User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

Tue Dec 02, 2014 5:47 am

It would still be possible to hit though, right? So something like nuke would make a hit effect on it?
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."

User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2611
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Tue Dec 02, 2014 1:49 pm

what about using a Marker ?
(sysCreateMarker string vector number)

THey are invisible stations that are used to make paths for AI ships but I wonder if they can show a label on the map :D
If so, we can drop labels on the map without tangible stations around.

User avatar
Autohummer
Militia Lieutenant
Militia Lieutenant
Posts: 235
Joined: Fri Jan 06, 2012 10:51 am

Tue Dec 02, 2014 3:51 pm

A semi-related question: is it possible to make a weapon deliberately inaccurate? I want to make a CIWS system/aircraft cannon that spews out a lot of bullets but with noticeable shot spread.
Has resurfaced!

User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

Wed Dec 03, 2014 12:27 am

Would "string" be the label, or just the marker name? Would there be more code to set the label?

Autohummer: Did you mean a skewed line of bullets, or random fire angles for each bullet? If the latter:

Code: Select all

particleSpreadAngle="15"
and set a big angle with a small number of particles moving at a high speed.
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."

User avatar
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Mon Dec 08, 2014 2:51 am

The string in
(sysCreateMarker string vector number)
is just a name for the marker. You can leave it blank by just doing "".

In KorolovShipping.xml there is an example:
(sysCreateMarker "rally" (sysVectorPolarOffset aBaseObj (random 0 359) (random 16 20)).
So "rally" is the name for this marker. I don't think we have marker functions yet to get markers by name but instead George used
(setq rallyPoint (sysCreateMarker "rally" (sysVectorPolarOffset aBaseObj (random 0 359) (random 16 20)) &svCommonwealth;))
so he calls rallyPoint whenever he wants to refer to this specific marker.

If you have any more questions feel free to ask!
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.

User avatar
catfighter
Militia Commander
Militia Commander
Posts: 466
Joined: Fri Nov 08, 2013 5:17 am
Location: Laughing manically amidst the wreckage of the Iocrym fleet.

Sat Dec 13, 2014 1:18 am

Back to the invisible station idea, if the station's bitmask was completely black would it be unhittable or would this cause some obscure little error that would fry the game engine to a pile of cinders?
Behold my avatar, one of the few ships to be drawn out pixel by pixel in the dreaded... Microsoft Paint!

Day 31: "I have successfully completed my time reversal experiment! Muahahaha!!!"
Day 30: "I might have run into a little problem here."

User avatar
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Mon Dec 29, 2014 2:03 am

It would be unhittable but usually virtual stations are spawned at the sun so the player would just hit the sun sprite instead.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.

Post Reply