Page 1 of 7

Weapon Laws OXZ

Posted: Wed Jan 09, 2019 1:56 am
by Redspear
This is Tionisle station control, how may we be of service?

I'll have 20 cannisters of computers, 12 of luxuries, 3 machinery and... a cascade mine as well please.
Can you confirm the last item please Sir?
A quirium cascade mine.
...Mines are not available at this station Sir.
Fine, fit me a rear military laser then.

Sir, this is a civilian facility, we encourage neither sale nor purchase of military hardware.
...Have you ever even left this station?... How's a lone trader supposed to survive out there against gangs of pirates?
This is a high tech democracy Sir, we have a well trained and extremely well equipped police force.
Pirates aren't as stupid as you folks within the aegis seem to think - they WAIT for viper patrols to pass.

...I'm sorry Sir, perhaps you'd like to try in one of the less 'monitored' systems.

Pick the safest milk run you can find, rinse and repeat, then soon enough you'll be piloting a fearsomely armed death machine, ready to take on anything.

Not any more..

GalCop doesn't want pirates flying around and it certainly doesn't want to be supplying them with weapons.
If a pilot wants anything fiercer than a mining laser then he, she or whomever is going to have to head somewhere a little out of the average Jameson's comfort zone in order to get it.

Generally speaking, the more dangerous the item, the more dangerous the system in which you'll find it for sale.
Tech level restrictions remain however and so some items will now be much rarer.

(edited list for v. 1.1)
  • Democracies
    ECM, shield boosters
  • Confederacies
    pulse lasers, military shield enhancement
  • Communist States
    missiles, multi-targeting system, target system memory expansion
  • Dictatorships
    beam lasers, scanner targeting enhancement
  • Multi-Governments
    military lasers, integrated targeting system
  • Feudal States
    ecm hardened missile, quirium cascade mine
  • Anarchies
    energy bomb :twisted: (...if installed :wink: )

'Advantages':
Trims the often 3+ page f3 screen down to something more manageable in many systems
Closer to typical risk/reward behaviour for game design
Prevents 'iron-assing' in the safer systems

To Do?:
Compatibility with other equipment altering oxps
Possibly add counterbalace whereby some equipment only avalable in safer systems
Incorporate relevant oxp equipment items

Now available from the in-game manager.

Hope it's of interest.

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 4:38 am
by phkb
Just a quick one - the "world-scripts.plist" file is unnecessary, because your script file is being referenced through entries in the equipment.plist file, and there are no worldscript events in play.

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 4:46 am
by phkb
Something to consider:
TL for Mil Lasers is TL11 (defined as "10" in equipment.plist).
TL for Naval Shield Booster is TL14 (defined as "13" in the equipment.plist)

Number of Anarchy systems in all 8 sectors > TL9 = 0.

Say 'goodbye' to ever seeing those items for sale again!

This might be an unintended consequence...

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 9:31 am
by Redspear
phkb wrote:
Just a quick one - the "world-scripts.plist" file is unnecessary, because your script file is being referenced through entries in the equipment.plist file, and there are no worldscript events in play.
Is this an either/or situation?
Could I remove the .plist enties and still have this work as a worldscript?
That could help a lot with cross-oxp compatability.
It seems to be the case that arrays of condition scripts are not allowed, and with no equipment-overrides.plist it becomes necessary to input each equipment item in a way that risks overruling (or being overruled by) changes in other equipment oxps, even when the changes themselves are not contradictory.

phkb wrote:
This might be an unintended consequence...
Ah yes, I really should have checked that :lol:
I presumed there would be one or two somewhere...

Items are censored for individual purchase only, they should still show up in ships for sale (f3,f3).
Never the less, I'll tweak that to make it a bit less draconian.

Thanks phkb :)

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 10:31 am
by phkb
Redspear wrote:
Is this an either/or situation?
You can use the one file for both, if you want to keep the world-script.plist reference. It would allow you to easily add events. However, note that the scope of the functions gets a little tricky in that situation, particularly if you want to reference shared variables between both types of script. If you remove the world-script.plist file (or remove the reference to your script file in world-script.plist), then it will only ever do the "allowAwardEquipment" function.

In my experience it's best to keep equipment condition scripts separate to world event scripts, to help with the mental process of scoping.
Redspear wrote:
It seems to be the case that arrays of condition scripts are not allowed
But you can define a separate script for each piece of equipment.
Redspear wrote:
with no equipment-overrides.plist it becomes necessary to input each equipment item in a way that risks overruling (or being overruled by) changes in other equipment oxps, even when the changes themselves are not contradictory.
Yes, this is a concern with overriding core equipment items. No built it way to handle this (that I've worked out yet - cue someone much more knowledgeable stepping forward and showing me how to do it right!). As the "allowAwardEquipment" JS script can't be effectively monkey-patched, even that method is not available for dealing with conflicts. It's down to the OXP authors to note and flag incompatibilities, or work hard to maintain compatibility.
Redspear wrote:
I presumed there would be one or two somewhere...
You might want to check Feudal systems as well. Max TL at all Feudals is TL10, but the Integrated Targeting System is min TL12.

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 11:44 am
by Redspear
phkb wrote: Wed Jan 09, 2019 10:31 am
You can use the one file for both, if you want to keep the world-script.plist reference. It would allow you to easily add events. However, note that the scope of the functions gets a little tricky in that situation, particularly if you want to reference shared variables between both types of script. If you remove the world-script.plist file (or remove the reference to your script file in world-script.plist), then it will only ever do the "allowAwardEquipment" function.

In my experience it's best to keep equipment condition scripts separate to world event scripts, to help with the mental process of scoping.
I think I follow you. If I do it (allowAwardEquipment) as a world script then I don't need the .plist entries but the presence of such .plist entries elsewhere could cause problems?

phkb wrote:
But you can define a separate script for each piece of equipment.
I like my conditions more than most :wink:
New lasers has conditions via script, Equipment by Ship Class (for which repairs are in progress) overrides equipment.plist and that's just my oxps. For myself I can put them all together but in modular oxp format it becomes tricky. As I understand it, if a p.list references a script that is not present then the game still accepts the .plist without applying the script. I could array scripts from other oxps requiring only one equipment.plist teference for each item to be in play (with judicious use of things like "incompatible with").

phkb wrote:
You might want to check Feudal systems as well. Max TL at all Feudals is TL10, but the Integrated Targeting System is min TL12.
Yes, I'll have to do a proper check this time. Some lower tech military items may only be available in anarchies however as I like the idea of using the full scope of government types.

Re: Weapon Laws OXZ

Posted: Wed Jan 09, 2019 9:10 pm
by phkb
Redspear wrote:
If I do it (allowAwardEquipment) as a world script then I don't need the .plist entries but the presence of such .plist entries elsewhere could cause problems?
Sorry, I wasn't clear. For an equipment item to use the allowAwardEquipment function, it must be defined in the equipment.plist. But you can use the same script file for defining other world script events if you add the filename to the world-script.plist file.

Re: Weapon Laws OXZ

Posted: Thu Jan 10, 2019 12:07 am
by Redspear
phkb wrote:
For an equipment item to use the allowAwardEquipment function, it must be defined in the equipment.plist.
That's a shame... Thanks for the clarification.

Meanwhile, v 1.1 is now available and uses the updated criteria in the first post.

Re: Weapon Laws OXZ

Posted: Fri Jan 11, 2019 8:11 pm
by Damocles Edge
I very much like the idea behind this oxp, that it will encourage / necessitate exploration away from safe systems.

Can I ask if the oxp increases the police presence the further up the scale you go away from anarchy systems (or does the stock game mechanics do this anyway) ?

I am also wondering if it would interact or conflict with 3 other weapons oxp's:

1. Laser Cannons
2. Eco Lasers
3. New Lasers - I tried my best to follow what you previously mentioned concerning the "allowAwardEquipment JS" but just ended up looking like a dog that's just been shown a card trick (credit to Bill Hicks) :lol:

Many thanks in advance for your attempts in vain to educate the dumb (me) :wink:

Re: Weapon Laws OXZ

Posted: Sat Jan 12, 2019 1:23 am
by Redspear
Damocles Edge wrote:
I very much like the idea behind this oxp, that it will encourage / necessitate exploration away from safe systems.
Yep, that's the idea: a bit more risk for your early to mid-game rewards.

Damocles Edge wrote:
Can I ask if the oxp increases the police presence the further up the scale you go away from anarchy systems (or does the stock game mechanics do this anyway) ?
The game does this anyway (at least according to my understanding) and then there's the interceptors in the high tech 'safe' systems.

Damocles Edge wrote:
I am also wondering if it would interact or conflict with 3 other weapons oxp's:
1. I haven't included combatibility yet but there shouldn't be any conflict (i.e. they should ignore each other)
2. I'm not familiar with this oxp and so can't give you a reliable answer yet
3. Some of the lasers in this one have their own condition scripts (rules) and so it's difficult to incorporate them for the reasons I discussed with phkb above (in layman's terms: keeping them in seperate oxps makes it complicated), no real conflict though, I think

I do have plans to add compatability of a sort with Missile Combat Reimagined (concerning ECM), Equipment by Ship Class and also New Lasers (although I'll need to experiment more with that last one). I have a plan that I expect to work but I haven't tried it yet - my ambition is way ahead of my skill :wink:

Re: Weapon Laws OXZ

Posted: Sat Jan 12, 2019 2:49 pm
by Damocles Edge
Just had a thought (this normally has people who know me screaming "oh dear god NO...")
But

Could this oxp affect what ships are available for sale at a given system?
For example all ships come with minimum pulse lasers, but Weapons Laws oxp states that pulse lasers are only available either confederacies or is it confederacies through to anarchies inclusive?
So would this mean that you cannot buy any ship whatsoever at corporate states or Democracies regardless of tech level due to the fact the default laser would be either pulse or perhaps beam?

Please accept my apologies if I am over thinking this (I tend to do that sometimes).

I will install the oxp and start a new game (I fancy a change of ship again anyhow).

I'll keep a log of all the oxp's that I have installed and report back anything I find.
I am also thinking will this oxp affect things like ore processor oxp or Naval Grid / Naval Grid Next oxps.

Sorry if I am prattling on - I'll spin it up and report back if / when there is anything to report.

Cheers

Re: Weapon Laws OXZ

Posted: Sat Jan 12, 2019 4:27 pm
by Redspear
Damocles Edge wrote: Sat Jan 12, 2019 2:49 pm
Could this oxp affect what ships are available for sale at a given system?
Short answer: no :)

Damocles Edge wrote: Sat Jan 12, 2019 2:49 pm
Weapons Laws oxp states that pulse lasers are only available either confederacies or is it confederacies through to anarchies inclusive?
It's confederacies through to anarchies (sorry, I didn't make that clear).

Damocles Edge wrote: Sat Jan 12, 2019 2:49 pm
So would this mean that you cannot buy any ship whatsoever at corporate states or Democracies regardless of tech level due to the fact the default laser would be either pulse or perhaps beam?
Nope: it affects items for sale but not ships (even though ships can include items). So, for example, I've seen ships with military lasers for sale in democracies.

Damocles Edge wrote: Sat Jan 12, 2019 2:49 pm
I am also thinking will this oxp affect things like ore processor oxp or Naval Grid / Naval Grid Next oxps.
It will only affect items that I have told it to - so far the only oxps it will meddle with are either my own or those that modify the core items listed in the first post.

Damocles Edge wrote: Sat Jan 12, 2019 2:49 pm
I'll spin it up and report back if / when there is anything to report.
Much appreciated :D

Re: Weapon Laws OXZ

Posted: Fri Feb 01, 2019 2:26 am
by UK_Eliter
I have had the thought behind this OXP myself. So I like it. However, given what the game is like as stock, restricting pulse lasers and missiles seems a bit extreme . .

Re: Weapon Laws OXZ

Posted: Fri Feb 01, 2019 8:04 am
by Redspear
The level of restriction for each item is variable of course but the player (typically) starts with both a pulse laser (indestructible) and some missiles. The pulse laser restriction is there more for consistency than effect (for the reason given above).

The restriction on missiles however is more significant but personally I think a danger level of Communist + is about right for an item that can destroy a smaller vessel.

Re: Weapon Laws OXZ

Posted: Fri Feb 01, 2019 12:57 pm
by UK_Eliter
I think that my point, at least about the pulse laser, is: it seems reasonable to allow ships a chance to defend themselves a little (even if, as you say, this particular restriction will not affect the player).