View previous topic :: View next topic |
|
Author |
Message |
CaptainKeyes
Lieutenant


Age: 17
Zodiac: 
Joined: 05 Jan 2005
Posts: 480
Location: Deep Space Nine

|
|
|

|
|
|
Ok, here's an idea I had - Sensor Stealth Mode. It's a sort of cloak, without a cloaking device.
When you hit the "Sensor Stealth Mode" button in Brex's or Miguel's menu, the glows on your ship turn off, your shields/weapons both go to 0%, and your engines and sensors both go to 10%. A script would turn the enemy's sensor range down to 25km or so, to simulate that your ship is hard to detect. The enemy would drop shields and weapons would go offline. They also would stop moving.
This would give you time to repair and such without being fire upon. If you powered weapons or shields, or increased power to engines or sensors, you would be detected and fired upon.
If possible, have a recursive timer count down from 1 minute. At the end of the one minute, there would be a 25% chance that the enemy would detect you and engage. If they didnt detect you, the timer would start again.
What do you think? Possible, useful, anyone want to do it?
|
_________________ "We all admire the wisdom of the people who come to us for advice." - Jack Herbert

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Instead of making all the enemys sensors go to 25km or something, it would be better to script some simple maths to check if the ship is within a 25km radius of your ship. If it is then make it visible to sensors, otherwise don't.
I might be wrong, but wasn't there already a powerdown mod very similar to this? Great idea all the same! 
|
_________________

|
|
Back to top |
|
 |
CaptainKeyes
Lieutenant


Age: 17
Zodiac: 
Joined: 05 Jan 2005
Posts: 480
Location: Deep Space Nine

|
|
|

|
|
|
The 25km thing you mentioned is what I meant, I just had trouble finding a way to put it
Quote: | wasn't there already a powerdown mod very similar to this? |
I've searched for it and have seen it mentioned several times, although never a download of it, and as far as i can tell, all that does is turn off glows and turns off all systems, although I may be wrong
|
_________________ "We all admire the wisdom of the people who come to us for advice." - Jack Herbert

|
|
Back to top |
|
 |
captain_obvious
the ultimate n00b. Vice Admiral


Age: 20
Zodiac: 
Joined: 29 Jun 2004
Posts: 1873
Location: Supplying, as a supplier shoud supply

|
|
|

|
|
|
CaptainKeyes wrote: | The 25km thing you mentioned is what I meant, I just had trouble finding a way to put it
Quote: | wasn't there already a powerdown mod very similar to this? |
I've searched for it and have seen it mentioned several times, although never a download of it, and as far as i can tell, all that does is turn off glows and turns off all systems, although I may be wrong |
i dont think it was ever released due to being supremely buggy!
|
_________________ Your Brain's Pattern
Your mind is an incubator for good ideas, it just takes a while for them to develop.
But when you think of something, watch out!
Your thoughts tend to be huge, and they come on quickly - like an explosion.
You tend to be quiet around others, unless you're inspired by your next big idea.
What Pattern Is Your Brain?
http://www.blogthings.com/whatpatternisyourbrainquiz/
|
|
Back to top |
|
 |
Cube
Astrophysics "FTW" General


Age: 21
Zodiac: 
Joined: 23 Jul 2004
Posts: 4606
Location: Sheffield

|
|
|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Ohh...right
Well I'd be interesed to have a go at scripting it, might take a look at some of the python syntax and functions used in the game script tonight if i get a chance.
Don't hold your breath! hehe
|
_________________

|
|
Back to top |
|
 |
Cube
Astrophysics "FTW" General


Age: 21
Zodiac: 
Joined: 23 Jul 2004
Posts: 4606
Location: Sheffield

|
|
|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
thanks man 
|
_________________

|
|
Back to top |
|
 |
JimmyB76
Fleet Admiral

Age: 33
Zodiac: 
Joined: 30 Jun 2003
Posts: 13365
Location: Rhode Island, USA

|
|
|

|
|
|
captain_obvious wrote: |
i dont think it was ever released due to being supremely buggy! |
nope, mine works perfectly fine... madon pulled the public beta from way back when to fine tune it and perfect it a bit more...
|
_________________ --------------------
|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
I made a start tonight and there is now a button that says "Power Down" in the menu. This (depending on the state on/off) will then Power Up or Power Down the ship.
I got that far, then I went to have a look in
Custom\NanoFXv2\NanoFX_ScriptActions
and i found two things of interest.
def TurnOnLights(pAction):
def TurnOffLights(pAction, pObject):
Could someone please explain how I can pass the correct object (ship) into this function?
Code: |
def PowerUpShip(pAction = None):
print("The ship has been powered back up!")
pShip = App.Game_GetCurrentPlayer()
TurnOnLights(pAction,pShip)
|
(oo and i have already imported Custom.NanoFXv2.NanoFX_ScriptActions)
Thanks 
|
_________________

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Forget it I figured it out lol VB has so many creature comforts .. sheesh!
Should this code:
Code: |
pShip = App.Game_GetCurrentPlayer()
gShip.SetTargetable(0) |
Hide the ship from sensors?
|
_________________

|
|
Back to top |
|
 |
CaptainKeyes
Lieutenant


Age: 17
Zodiac: 
Joined: 05 Jan 2005
Posts: 480
Location: Deep Space Nine

|
|
|

|
|
|
Quote: | I made a start tonight and there is now a button that says "Power Down" in the menu |
It's not so much of a power down as a stealth mode. You still have sensors and engines. I meant it to be something you sneak up on the enemy with or sneak away from them with, rather than a spacedock-style power down.
|
_________________ "We all admire the wisdom of the people who come to us for advice." - Jack Herbert

|
|
Back to top |
|
 |
Wowbagger
Lieutenant JG


Age: 20
Zodiac: 
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah

|
|
|

|
|
|
Curses! I've been secretly working on-and-off on a similar mod for several weeks, called Silent Running. It powers down everything to 5%, leaving the ship all but adrift, but it makes the ship much harder to detect.
Not having much luck getting my listeners to detect when the player powers the systems back up. I tell it to CallFunctionWhenConditionChanges, and it just decides that the bloody condition never changes.
I'll see if I can post my code in the near future. Not having it all right here on my Internet-enabled computer makes it difficult, though.
|
_________________

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Wobagger, perhaps we colabourate? It seems silly to have two mods that do the same(ilar) thing.
I could write the sensor range sub and then it coud be called by what u have done?
|
_________________

|
|
Back to top |
|
 |
Wowbagger
Lieutenant JG


Age: 20
Zodiac: 
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah

|
|
|

|
|
|
I consent. Collaboration is awesome, so long as it isn't with the Cardies.
We should determine precisely what we wish to accomplish before beginning, though. As I understand it, this is what we have so far. Of course, I might get some of this mixed up with the stuff I've already scripted, but here goes:
1. Add a button to a menu (Brex?).
2. Cut power to subsystems (my version actually cuts available power from all three battery systems).
3. Shut down the running lights and/or glows using NanoFX (I haven't touched this yet).
4. Make the ship invisible to enemy sensors. (Cloaking?)
5. Set up several handlers that lead to automatic detection (range, weapons hit, and/or randomly timed discovery?)
6. Make the button allow power up again.
7. Power up, reactivate lights, make ship visible, and unload timers and/or variables.
Is that accurate-ish?
I've got a little done, so what say we swap code?
|
_________________

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Wowbagger wrote: | I consent. Collaboration is awesome, so long as it isn't with the Cardies.
We should determine precisely what we wish to accomplish before beginning, though. As I understand it, this is what we have so far. Of course, I might get some of this mixed up with the stuff I've already scripted, but here goes:
1. Add a button to a menu (Brex?).
|
Wahhey then! lol
Brex sounds good, we could either have a menu, perhaps the best idea. Or toggle buttons.
Quote: |
2. Cut power to subsystems (my version actually cuts available power from all three battery systems).
|
Perhaps if we shut down the warp core and main power, then run off backups. Might add realism
Quote: |
3. Shut down the running lights and/or glows using NanoFX (I haven't touched this yet).
|
Got it covered Also with flickering for added effects. Would also be nice to have a powerdown cutscene? What do you think?
Quote: |
4. Make the ship invisible to enemy sensors. (Cloaking?)
|
I am not sure about cloaking here, I tried this code
Code: | pShip = App.Game_GetCurrentPlayer()
pShip.SetTargetable(0) |
but that didn't work, It was late tho - so i can probs get it to work - if not grovvel to someone who can! hehe
But if we can script a timer which runs every other second or so when power is off, this can then check with some simple maths if a ship is within X units radius of the players ship. If it is then
Code: | chancevar= App.g_kSystemWrapper.GetRandomNumber(2)
if (chancevar > 1):
pShip.SetTargetable(1) |
Quote: |
5. Set up several handlers that lead to automatic detection (range, weapons hit, and/or randomly timed discovery?)
|
Yes, brill! Perhaps we could create a sensor ghost type thing here too where another button (as an extention to this mod) makes "ghosts" of our ship appear randomly. More for gameplay than anything.
Quote: |
6. Make the button allow power up again.
|
np Should be fairly easy with a few globals to store settings of the previous state
Quote: |
7. Power up, reactivate lights, make ship visible, and unload timers and/or variables.
|
I think that when we power down it would be nice to get Red Alert working, so the bridge darkens aswell. Would be a nice touch.
Quote: |
Is that accurate-ish?
I've got a little done, so what say we swap code? |
Sure! Do you have MSN? lol
|
_________________

|
|
Back to top |
|
 |
Wowbagger
Lieutenant JG


Age: 20
Zodiac: 
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah

|
|
|

|
|
|
Okay. I was screwing around with this over the last couple of days (as the beginning of classes looms, it's been harder to find spare time), and I found that Code: | pPlayer.SetTargetable(0) | actually does do what it's supposed to: it makes a ship untargetable. However, if the ship has already been targeted, it remains a target to the attacking vessel only, and, if the attacker retargets, he won't be able to target the ship again.
I'm working on a way to flicker enemy sensors to try to force them to retarget.
For making the ship go to red alert, would that be:
Code: | ShipClass.SetAlertLevel(2) | ?
I do indeed have MSN. Screen name is Wowbagger, but I am rarely on IM. Tee hee. Little joke in there.
|
_________________

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Yea school is looming... I have some coursework to knock on the head in the next week and entertain a certain female before we go back to school so I will be probs quite chokka block. But after then things should ease up.
Great news about the Code: | pPlayer.SetTargetable(0) |
I'll give the red alert a try.
About flicking sensors, you could try a modified version of what nano did at
BC\scripts\Custom\NanoFXv2\NanoFX_Lib.py
for the flicker sequence, to find out how to queue the event sequence.
So what we need now is a plan of action.
Any thoughts?
|
_________________

|
|
Back to top |
|
 |
gamesfunk
Moderator


Age: 20
Zodiac: 
Joined: 23 Apr 2004
Posts: 790
Location: Weapons Resarch Facility, Veldhoven, The Netherlands

|
|
|

|
|
|
Looks pretty interesting. Reminding: ask nano for permission! Btw, always availible as beta-tester .
G.
|
_________________ Should I care less...
|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
hehe
As far as I am concerned you would be most welcome.
|
_________________

|
|
Back to top |
|
 |
Wowbagger
Lieutenant JG


Age: 20
Zodiac: 
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah

|
|
|

|
|
|
lost_jedi wrote: | So what we need now is a plan of action.
Any thoughts? |
Plan of action. Hmm. First, let's capitalize it: Plan of Action.
Excellent.
I think I'm nearing the completion of a very, very basic version. So how about I wrap that up at the earliest possible date, then post it here and let you have a look at it. We should be able to lick this within two weeks that way.
|
_________________

|
|
Back to top |
|
 |
lost_jedi
Rear Admiral


Age: 21
Zodiac: 
Joined: 15 Aug 2004
Posts: 1614
Location: Buxton Staffordshire UK

|
|
|

|
|
|
Sure thing
This is what i had so far. It disables glows and flickers them to turn them back on.
Code: |
#################################
# Power Down Mod 0.01 #
# John Hardy aka Lost_Jedi #
# #
#################################
import App
import MissionLib
import Foundation
import Custom.NanoFXv2.NanoFX_Lib
import Custom.NanoFXv2.NanoFX_ScriptActions
import Bridge.BridgeUtils
mode = Foundation.MutatorDef("Power Down Ship")
# Setup a few variables
PowerStatus = "ON"
PowerDownButton = None
ET_POWER = App.Mission_GetNextEventType()
class PowerDownTrigger(Foundation.TriggerDef):
def __init__(self, name, eventKey, dict = {}):
Foundation.TriggerDef.__init__(self, name, eventKey, dict)
def __call__(self, pObject, pEvent):
global PowerDownButton
global PowerStatus
## print("Testing Testing 123!")
## Power Down Code Goes here
if(PowerStatus == "OFF"):
PowerStatus = "ON" # Toggle the power mode
##print(PowerStatus)
PowerUpShip()
return #Prevent The Button Swapping Back
if(PowerStatus == "ON"):
PowerStatus = "OFF" # Toggle the power mode
##print(PowerStatus)
PowerDownShip()
return #Prevent The Button Swapping Back
PowerDownTrigger("Power Down", ET_POWER, dict = {"modes": [mode]})
def PowerDownShip(pAction = None):
print("The ship has been powered down!")
pShip = App.Game_GetCurrentPlayer()
Custom.NanoFXv2.NanoFX_ScriptActions.TurnOffLights(pAction,pShip) #Turn the lights off
gShip = MissionLib.GetPlayer()
gShip.SetTargetable(0) #Hide me
def PowerUpShip(pAction = None):
print("The ship has been powered back up!")
pShip = App.Game_GetCurrentPlayer()
pSequence = App.TGSequence_Create() #Create a sequence
pSequence.AddAction(Custom.NanoFXv2.NanoFX_Lib.CreateFlickerSeq(pShip, 1.5), App.TGAction_CreateNull(), 0.4)
MissionLib.QueueActionToPlay(pSequence)
Custom.NanoFXv2.NanoFX_ScriptActions.TurnOnLights(pAction) #Turn the lights on
gShip = MissionLib.GetPlayer()
gShip.SetTargetable(1) #SHOW me
def HideFromView(pAction = None):
print("The ship has been hidden from sensors!")
pShip = App.Game_GetCurrentPlayer()
def RestoreButton(pAction = None):
global PowerDownButton
PowerDownButton.SetEnabled()
return
class PDGUIInit(Foundation.TriggerDef):
def __init__(self, name, eventKey, dict = {}):
Foundation.TriggerDef.__init__(self, name, eventKey, dict)
def __call__(self, pObject, pEvent):
if(mode.IsEnabled()):
global PowerDownButton, ET_POWER
if(PowerDownButton): #Prevent LOOOOADS of copies of the button
PowerDownButton.SetNotVisible() #by testing to see if its been used
person = App.CharacterClass_GetObject(App.g_kSetManager.GetSet("bridge"), "Helm")
PowerDownButton = Bridge.BridgeUtils.CreateBridgeMenuButton(App.TGString("Power Down"), ET_POWER, 0, person)
PowerDownButton.SetVisible()
pMenu = Bridge.BridgeUtils.GetBridgeMenu("Helm")
pMenu.PrependChild(PowerDownButton)
PowerDownButton.SetVisible()
PDGUIInit("PD GUI Init", App.ET_OBJECT_CREATED, dict = {"modes": [mode]})
|
|
_________________

|
|
Back to top |
|
 |
Gareth
Admiral


Age: 25
Zodiac: 
Joined: 27 Aug 2001
Posts: 2477
Location: Sheffield, UK

|
|
|

|
|
|
all this sounds like what KA and SFC did with it's ECM [Electronic Counter Measures] & ECCM [Electronic Counter-Countermeasures] 
|
|
|
Back to top |
|
 |
Wowbagger
Lieutenant JG


Age: 20
Zodiac: 
Joined: 03 Apr 2005
Posts: 270
Location: Minne-soh-tah

|
|
|

|
|
|
Whoa. That's all like... class-y.
Seriously, where did you get this method of button scripting? It looks like it's adapted from some of the autoload files. In any case, it looks very cool, and therefore is, of course, almost utterly incomprehensible to me.
I adapted a goodly spot of your code (esp. those great NanoFX scripts) and put them in a file that belongs in the QBautostart. In testing, this version worked pretty well, but, for the moment, I have added in no sequence at start or finish. I don't even have a sound effect; just the glows reactivating.
At the moment, you can enter Silent Running (as I have it named) only when roughly 20 km (approx. 100.0 world units) away from the nearest enemy. Glows deactivate. The warp core is non-explosively and temporarily destroyed, main power drops to 10%, and the ship runs off batteries.
You can then be detected by getting within roughly 5 km of an enemy ship, being hit by a random weapon, somehow repairing your warp core, firing a weapon yourself, or just waiting until a random sensor sweep catches you (determined by a random number between 1 and 540, divided by the number of enemy ships in the set. With 3 enemy ships in the fight, the average detection time is 90 seconds). Once you are detected, the main computer automatically resets your power settings to optimal red alert levels, and the glows reactivate.
The script goes in scripts/Custom/QBautostart.
|
_________________

|
|
Back to top |
|
 |
CaptainKeyes
Lieutenant


Age: 17
Zodiac: 
Joined: 05 Jan 2005
Posts: 480
Location: Deep Space Nine

|
|
|

|
|
|
Ok, this is probably something I did, but I installed this and no button showed up
I was using FBCMP 0.8
|
_________________ "We all admire the wisdom of the people who come to us for advice." - Jack Herbert

|
|
Back to top |
|
 |
ModderMan
Captain


Joined: 06 May 2005
Posts: 1116
Location: Canada Eh ?

|
|
|
|
Back to top |
|
 |
Meteorafallen
Lieutenant


Age: 20
Zodiac: 
Joined: 23 Jun 2005
Posts: 390
Location: Ft. Pierce, FL

|
|
|

|
|
|
or better yet which menu is it sopposed to be in ??
|
_________________ DarkFallen Shipyards: Creator, Supervisor

|
|
Back to top |
|
 |
Cube
Astrophysics "FTW" General


Age: 21
Zodiac: 
Joined: 23 Jul 2004
Posts: 4606
Location: Sheffield

|
|
|
|
Back to top |
|
 |
Meteorafallen
Lieutenant


Age: 20
Zodiac: 
Joined: 23 Jun 2005
Posts: 390
Location: Ft. Pierce, FL

|
|
|

|
|
|
well there is a cool thing that i mentioned to USS Sovy about that when i hit the sensor button to turn off the sensors miugel says "main deflector is offline " so i looked at the ships deflector and the light map 4 it was turned off but neways back to topic
|
_________________ DarkFallen Shipyards: Creator, Supervisor

|
|
Back to top |
|
 |
Meteorafallen
Lieutenant


Age: 20
Zodiac: 
Joined: 23 Jun 2005
Posts: 390
Location: Ft. Pierce, FL

|
|
|

|
|
|
well ive also tried this and theres no button from what i can see hmmmmm.....
:sorry 4 double postin:
|
_________________ DarkFallen Shipyards: Creator, Supervisor

|
|
Back to top |
|
 |
|