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.

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."
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?

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.

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."
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?

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.

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: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

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: 238
Joined: Fri Jan 06, 2012 10:51 am

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.

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."
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?

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.

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."
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?

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