Codemonkeys take heed! ;)
Moderators: winston, another_commander
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Codemonkeys take heed! ;)
What is missing are some basic methods that give more handles on game parameters. Some would be really usefull for possible equipment and weapon_oxps.
generic mission scripting:
>GetPlayerInfo: key >>returns the value stored under the requested key.
To help in defining mission requirements.
such as playerMaxCargo to determine the cargohold of the playership
>Can locations gathered from getCoordinatesFromTarget be used as parameters in locational methods such as addAhipInRadius?
If so: cool! we need to document that in the wiki.
If not: I want it to,
maybe a method to store those coords as callable values.
example:
addShipsAtPrecisely <Coordsystem> <X> <Y> <Z> <shipentity> <number>
---
Equipment scripting:
Options to modify weapon behaviour, besides damage and colour. and more freedom to think up nice equipment.
awardCargospace: negative for big (not cargohold increasing) refits
awardPylon (for extra pylon, should cost cargospace)
<key>cycle rate
<key>range
<key>allowedMountings <array>
<key>requires: <conditions script>
energydrain (and energyDrainTarget)
addHeat (and addHeatToTarget)
fireItemFromMissilePort (item can function as non-pylon missile)
ammonitiontype: (MISSIONPARAMETER) AMMO_TYPE1_25
expendAmmo: -1, negatively increments AMMO_TYPE1_25 to .._24
etcetera...
Not being unthankfull, just throwing out suggestions.
by the shedload.
generic mission scripting:
>GetPlayerInfo: key >>returns the value stored under the requested key.
To help in defining mission requirements.
such as playerMaxCargo to determine the cargohold of the playership
>Can locations gathered from getCoordinatesFromTarget be used as parameters in locational methods such as addAhipInRadius?
If so: cool! we need to document that in the wiki.
If not: I want it to,
maybe a method to store those coords as callable values.
example:
addShipsAtPrecisely <Coordsystem> <X> <Y> <Z> <shipentity> <number>
---
Equipment scripting:
Options to modify weapon behaviour, besides damage and colour. and more freedom to think up nice equipment.
awardCargospace: negative for big (not cargohold increasing) refits
awardPylon (for extra pylon, should cost cargospace)
<key>cycle rate
<key>range
<key>allowedMountings <array>
<key>requires: <conditions script>
energydrain (and energyDrainTarget)
addHeat (and addHeatToTarget)
fireItemFromMissilePort (item can function as non-pylon missile)
ammonitiontype: (MISSIONPARAMETER) AMMO_TYPE1_25
expendAmmo: -1, negatively increments AMMO_TYPE1_25 to .._24
etcetera...
Not being unthankfull, just throwing out suggestions.
by the shedload.
Riding the Rocket!
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Oh important one:
Key binding
Probably needs to be hardcoded and defined in a plist.
eg. in equipment.plist or such::
<key>Boundkey</key>
<integer>keyvalue</integer>
<key>PlusShift</key>
</false>
<key>PlusCTRL</key>
</false>
with:
<key>key_action</key>
<array>
<string>performScriptOnTarget: becomeExplosion</string>
</array>
Key binding
Probably needs to be hardcoded and defined in a plist.
eg. in equipment.plist or such::
<key>Boundkey</key>
<integer>keyvalue</integer>
<key>PlusShift</key>
</false>
<key>PlusCTRL</key>
</false>
with:
<key>key_action</key>
<array>
<string>performScriptOnTarget: becomeExplosion</string>
</array>
Riding the Rocket!
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
-
- Quite Grand Sub-Admiral
- Posts: 364
- Joined: Tue Aug 17, 2004 7:05 am
- Location: Orange, NSW, Australia
I actually implemented scripts bound to keys last year, but couldn't find a use for it so never checked it in!
Arexack_Heretic wrote:Oh important one:
Key binding
Probably needs to be hardcoded and defined in a plist.
eg. in equipment.plist or such::
<key>Boundkey</key>
<integer>keyvalue</integer>
<key>PlusShift</key>
</false>
<key>PlusCTRL</key>
</false>
with:
<key>key_action</key>
<array>
<string>performScriptOnTarget: becomeExplosion</string>
</array>
Regards,
David Taylor.
David Taylor.
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
I second that very much!
I'm sure there are lots and lots of ideas out there for new equipments, but many of them would need a key in order to be used (e.g. retrorockets, see https://bb.oolite.space/viewtopic.php?t=3053). Or imagine a keystroke for "sendDistressCall" (after all NPC-AIs can react to distress calls). Some programmers have helped themselves with having their new equipment items take one missile-slot, but that's not a general solution.
I'm sure there are lots and lots of ideas out there for new equipments, but many of them would need a key in order to be used (e.g. retrorockets, see https://bb.oolite.space/viewtopic.php?t=3053). Or imagine a keystroke for "sendDistressCall" (after all NPC-AIs can react to distress calls). Some programmers have helped themselves with having their new equipment items take one missile-slot, but that's not a general solution.
-
- Quite Grand Sub-Admiral
- Posts: 364
- Joined: Tue Aug 17, 2004 7:05 am
- Location: Orange, NSW, Australia
Well, the JavaScript branch allows OXPs to listen for keystrokes to trigger behaviour so it is covered there.
My original thought last year was that binding scripts to keys would allow OXPs to create new equipment too, but in the standard game engine there isn't enough of the internals exposed to do anything very useful.
Neither of the things you mention as examples are possible just by allowing a script to be triggered by a keystroke. They need changes to the engine.
My original thought last year was that binding scripts to keys would allow OXPs to create new equipment too, but in the standard game engine there isn't enough of the internals exposed to do anything very useful.
Neither of the things you mention as examples are possible just by allowing a script to be triggered by a keystroke. They need changes to the engine.
Regards,
David Taylor.
David Taylor.
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
Another request, that is rather a bug-fix than a new method:
Fixing the ScanForNonThargoid/scanForThargoid methods, so that all ships with role = "thargoid*" ("thargoid, missile", thargoid(0.20), "bug, thargoid", etc) are recognised as "thargoid".
Or was this already fixed...I can't remember.
Fixing the ScanForNonThargoid/scanForThargoid methods, so that all ships with role = "thargoid*" ("thargoid, missile", thargoid(0.20), "bug, thargoid", etc) are recognised as "thargoid".
Or was this already fixed...I can't remember.
Riding the Rocket!
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Of course they do. It wouldn't help to have the scripts listen for keys, as that would happen only once every ten seconds. Not very useful for an immediate action...dajt wrote:Well, the JavaScript branch allows OXPs to listen for keystrokes to trigger behaviour so it is covered there.
My original thought last year was that binding scripts to keys would allow OXPs to create new equipment too, but in the standard game engine there isn't enough of the internals exposed to do anything very useful.
Neither of the things you mention as examples are possible just by allowing a script to be triggered by a keystroke. They need changes to the engine.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
This is not fixed, and there is at least one other related issue. The underlying problem looks relatively simple, but testing and finding all variants of the problem will take time. It’s on my list now.Arexack_Heretic wrote:Fixing the ScanForNonThargoid/scanForThargoid methods, so that all ships with role = "thargoid*" ("thargoid, missile", thargoid(0.20), "bug, thargoid", etc) are recognised as "thargoid".
E-mail: [email protected]
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
what variants are you talking about here?
Do you mean all methods and code checking the 'role' of entities, when it should be checking the 'roles' for presence of a single role?
AFAIK:
but methods like AddShips: <role> could be affected too?
Do you mean all methods and code checking the 'role' of entities, when it should be checking the 'roles' for presence of a single role?
AFAIK:
Code: Select all
ScanForRandomMerchantmen- looks for roles player and trader.
ScanForNearestMerchantmen
ScanForNonThargoid-only ignores ships with 'thargoid' in role.
scanForThargoid -selects random thargoid in range
scanRole - random select
scanForNearestShipWithRole -select closest
scanForLoot
scanForRandomLoot
scanForRocks
Riding the Rocket!