First OXP (Crybaby)
Moderators: winston, another_commander
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
First OXP (Crybaby)
I'm embarking on my first OXP (it's intentional involved so I can wrap my head around certain concepts while working on it) the basis is as follows
1. creates a new equipment (perhaps missile or bomb type?) EDIT : most likely pylon mounted missile type
2. when launched the device emits an SOS or registers as a bigger threat than the owner.
3. should take cargo space, to limit number of uses. 1 use = 1 ton EDIT : Pylon mount takes care of this
EDIT 4. Possible to make this equip unavailable at standard stations, as it would in theory be using an illegal transponder?
can some of you nice folks point me in the right places to look at for where to begin here?
1. creates a new equipment (perhaps missile or bomb type?) EDIT : most likely pylon mounted missile type
2. when launched the device emits an SOS or registers as a bigger threat than the owner.
3. should take cargo space, to limit number of uses. 1 use = 1 ton EDIT : Pylon mount takes care of this
EDIT 4. Possible to make this equip unavailable at standard stations, as it would in theory be using an illegal transponder?
can some of you nice folks point me in the right places to look at for where to begin here?
Last edited by Dr.Tripsa on Thu May 03, 2012 6:33 pm, edited 1 time in total.
- SandJ
- ---- E L I T E ----
- Posts: 1048
- Joined: Fri Nov 26, 2010 9:08 pm
- Location: Help! I'm stranded down here on Earth!
Re: First OXP (Crybaby)
If it is on a pylon, then that limits the number of uses.Dr.Tripsa wrote:1. creates a new equipment (perhaps missile or bomb type?)
3. should take cargo space, to limit number of uses.
Was it your intention to limits its number to just one - if you make it equipment that should have that effect.Dr.Tripsa wrote:3. should take cargo space, to limit number of uses.
That is very heavy for a radio beacon.Dr.Tripsa wrote:2. when launched the device emits an SOS
3. 1 use = 1 ton
The Cargo Shepherd might be a good example of a piece of pylon-mounted equipment.
Flying a Cobra Mk I Cobbie 3 with nothing but Explorers Club.OXP and a beam laser 4 proper lasers for company
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Dropbox referral link 2GB of free space online + 500 Mb for the referral: good for securing work-in-progress.
Re: First OXP (Crybaby)
Overall OXP information: [wiki]OXP_howto[/wiki]Dr.Tripsa wrote:I'm embarking on my first OXP (it's intentional involved so I can wrap my head around certain concepts while working on it) the basis is as follows
1. creates a new equipment (perhaps missile or bomb type?)
2. when launched the device emits an SOS or registers as a bigger threat than the owner.
3. should take cargo space, to limit number of uses. 1 use = 1 ton
can some of you nice folks point me in the right places to look at for where to begin here?
Scripting reference: [wiki]Oolite_JavaScript_object_model[/wiki]
New equipment is defined in [wiki]equipment.plist[/wiki]. Making the equipment itself take up cargo space is impossible, but you could make it consume 1t of Minerals/Alloys/Narcotics from the hold when used. Alternatively, if you make it a missile or a mine, it'll take up a pylon slot in place of a normal missile, which easily restricts how many can be carried at once.
Point 2 requires messing around with the AIs of nearby ships - see [wiki]OXP_howto_AI[/wiki] for AI coding, and the Ship object in the Javascript reference for how to adjust some of the parameters used.
Good luck!
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
Finally beginning work on this,
equipment.plist
CrybabyAI.plist
shipdata.plist
CrybabyLaunch.js <= TBD, may be unneeded...
The above should be enough to register it as equipment available to players in tech level 9 worlds, for 100CR as a single use "mine". The AI -should- be simple enough to keep it doing nothing but spamming for help, which is the idea.
When used it should free itself from a pylon (making it single use) by default as a "_MINE".
Any help at this point would be appreciated :S
equipment.plist
Code: Select all
(
(
8,
1000,
"Crybaby Transponder",
"EQ_CRY_BABY_MINE",
"Cry, baby, cry. Make your momma sigh. Emergency beacon.",
{
"available_to_all" = true;
"requires_empty_pylon" = true;
}
// unneeded? "script" = "CrybabyLaunch.js";
)
)
Code: Select all
{
GLOBAL = {
ENTER = ("commsMessageByUnpiloted: Crying!!", broadcastDistressMessage);
EXIT = ();
UPDATE = (broadcastDistressMessage, "pauseAI: 8");
// Thanks to Eric Walch!
};
}
Code: Select all
{
crybaby_transponder = {
"like_ship" = "barrel";
//THANKS!! to Wyvern_Mommy for that!
ai_type = "CrybabyAI.plist";
unpiloted = yes;
"roles" = EQ_CRY_BABY_MINE crybaby_transponder";
};
}
The above should be enough to register it as equipment available to players in tech level 9 worlds, for 100CR as a single use "mine". The AI -should- be simple enough to keep it doing nothing but spamming for help, which is the idea.
When used it should free itself from a pylon (making it single use) by default as a "_MINE".
Any help at this point would be appreciated :S
Last edited by Dr.Tripsa on Mon Jan 21, 2013 8:35 pm, edited 3 times in total.
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: First OXP (Crybaby)
This UPDATE needs a pause to become:
Without pause, it is broadcasted 4 times every second. That is a bit overuse of cpu time. Specially because identical messages are suppressed and not visible at all.
One problem will be that the beacon needs a primary aggressor that is already targeting the beacon in attack mode. If not present, broadcastDistressMessage will do nothing.
EDIT: This behaviour is different that written in the wiki were it is suggested that you can set a primary target that will become the "aggressor". I looked it up, and the wiki was correct up to Oolite 1.74. In 1.76 there already needed to be an explicit primary aggressor. Probably to prevent buggy behaviour where a viper went after an unwanted primary target. (Going to edit the wiki now....)
Code: Select all
UPDATE = (broadcastDistressMessage, "pauseAI: 8");
One problem will be that the beacon needs a primary aggressor that is already targeting the beacon in attack mode. If not present, broadcastDistressMessage will do nothing.
EDIT: This behaviour is different that written in the wiki were it is suggested that you can set a primary target that will become the "aggressor". I looked it up, and the wiki was correct up to Oolite 1.74. In 1.76 there already needed to be an explicit primary aggressor. Probably to prevent buggy behaviour where a viper went after an unwanted primary target. (Going to edit the wiki now....)
Last edited by Eric Walch on Mon Jan 21, 2013 8:37 pm, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
thanks for that Eric, fixing...
the lack of aggressor being a factor is irksome, mayby I should use another "like_ship" instead and see if I can give it some cargo , perhaps gold, as bait?
Almost there, reworked into a tasty floating cargo... that explodes if scooped by npc, only one problem now...
it launches at an extreme rate of speed (injectors needed just to catch it!) HELP!
the lack of aggressor being a factor is irksome, mayby I should use another "like_ship" instead and see if I can give it some cargo , perhaps gold, as bait?
Almost there, reworked into a tasty floating cargo... that explodes if scooped by npc, only one problem now...
it launches at an extreme rate of speed (injectors needed just to catch it!) HELP!
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
UPDATE!
Crybaby is almost ready, It's had to change a bit...
Credit due to Wyvern_Mommy for the booby-trap concept!
So before I release this I need input...
How much should it cost?
What tech level do you suggest?
What do you think of the Detection/damage range?
Crybaby is almost ready, It's had to change a bit...
Credit due to Wyvern_Mommy for the booby-trap concept!
Code: Select all
The Crybaby EDM (Extreme Defensive Measures) Mine
----------------------------------------------------
Deployed like a mine, appears as a cargo canister...
Silently waits while monitoring transponder codes and cross referencing these with GalCops Database.
(there is much debate as to if its access to this database is legal)
When it detects a known pirate within 200m, a Quirium/Hydrogen explosion is triggered.
Effective Range: 1/2Km (500)
Effective Energy: 5Keu (5000)
How much should it cost?
What tech level do you suggest?
What do you think of the Detection/damage range?
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
Re: First OXP (Crybaby)
If you're using the AI command So, at 200m, this would do:
For comparison, a pulse laser hit does 16, and a missile does around 250. In that case, the explosion probably needs either a lot more power or a little more range.
If you're using the JS methodIt would therefore do 5000 damage to the target, enough to destroy a Behemoth twice. At the edge of scanner range, it will still do around 2 points of damage. In this case, you can probably reduce the power substantially (just set it to the amount of damage you want the mine to do to its target, in fact)
dealEnergyDamageWithinDesiredRange
for the explosion, the damage formula is:
Code: Select all
(Energy * Effective Range) / (6.76 * Actual Range * Actual Range)
Code: Select all
(5000 * 500) / (6.76 * 200 * 200) = 9 points of damage
If you're using the JS method
dealEnergyDamage
then the damage formula is simpler, though the mine will require Oolite 1.77 or later.
Code: Select all
Energy (within effective range)
(Energy * Effective Range) / (Actual Range * Actual Range) (outside effective range)
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
thank you for this cim, I wasn't aware of the constants there... I'll recalculate based on those figures
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
UPDATE:
took cim's advice and revised to dealEnergyDamage, this caps max damage at 256 within 1/2Km of the blast.
took cim's advice and revised to dealEnergyDamage, this caps max damage at 256 within 1/2Km of the blast.
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Rorschachhamster
- ---- E L I T E ----
- Posts: 274
- Joined: Sun Aug 05, 2012 11:46 pm
- Contact:
Re: First OXP (Crybaby)
Food for thought:Dr.Tripsa wrote:...
(there is much debate as to if its access to this database is legal)
When it detects a known pirate within 200m, a Quirium/Hydrogen explosion is triggered.
If you are an offender using it... BOOM?
Does it just register OTHER pirates?
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
Hmm fair point, I could do that, or just make it unavailable to players with an offender status...Rorschachhamster wrote:Food for thought:Dr.Tripsa wrote:...
(there is much debate as to if its access to this database is legal)
When it detects a known pirate within 200m, a Quirium/Hydrogen explosion is triggered.
If you are an offender using it... BOOM?
Does it just register OTHER pirates?
For the moment, until I ponder this a bit more I've added
"requires_clean" = yes;
to the equipment.plist for this.
Test Version available, at tech level 9 systems, with clean status.. for 100CR
http://dl.dropbox.com/u/9855374/Crybaby ... .0.oxp.zip
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: First OXP (Crybaby)
Very cheap, for a WMD..Dr.Tripsa wrote:Test Version available, at tech level 9 systems, with clean status.. for 100CR
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Dr.Tripsa
- Dangerous
- Posts: 84
- Joined: Mon Apr 30, 2012 9:33 pm
- Location: In your cargo bay, eating your chips.
Re: First OXP (Crybaby)
Less WMD than you might think, it only has an effective blast radius of 1/2 Km (by contrast the scanner display is what .. 10Km radius? ) additionally it is only activated by the presence of a pirate (entity.hasRole("pirate")) within 1/5 Km.
The reason for the test release is so people can give feedback on pricing/availability after playing with it a bit
The reason for the test release is so people can give feedback on pricing/availability after playing with it a bit
No, I'm not a Trumble... that's a speciest and offensive remark!
~munch~
What?.... I'm hungry.
~munch~
What?.... I'm hungry.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: First OXP (Crybaby)
Not true as this tests if a "pirate" role is among the possible roles for that ship, that may be added as a trader at the moment. You probably need: (entity.primaryRole == "pirate")Dr.Tripsa wrote:it is only activated by the presence of a pirate (entity.hasRole("pirate")) within 1/5 Km.
UPS-Courier & DeepSpacePirates & others at the box and some older versions