Bridge Commander Central

BC Forums => BC Bridge Modding => Topic started by: ChronowerX_GT on January 30, 2008, 10:41:41 AM

Title: Changing Bridge Animations
Post by: ChronowerX_GT on January 30, 2008, 10:41:41 AM
Hi there, I was wondering how I would change how fast the animations change on the LCARS displays on a bridge. I heared that it is a scripting thing. Also how do I add animations to dispays with none on???
Title: Re: Changing Bridge Animations
Post by: MLeo on January 30, 2008, 10:48:56 AM
One important thing to know is, what bridge are you looking into changing?

And remember, there are 2 ways to animate lcars in BC, the not modifyable way and the scripting way through BPCore.

If it's the latter case, it can be changed (and added) through the bridges plugin (found commonly in scripts/Custom/Autoload).


*Moved to Bridge Modding*
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on January 30, 2008, 12:51:53 PM
Sorry it's the Generations Galaxy bridge. I've been retexturing it with  new lcars etc and i wanted to add/change the animations on the bridge.
Title: Re: Changing Bridge Animations
Post by: MLeo on January 30, 2008, 01:22:59 PM
Sorry it's the Generations Galaxy bridge. I've been retexturing it with  new lcars etc and i wanted to add/change the animations on the bridge.
Well, the plugin is in scripts/Custom/Autoload/GalaxyRefit.py

And it has one (scripted) animated map, when in Red Alert, so any other animated maps (animations other than the one in red alert) can't be changed.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on January 31, 2008, 05:45:41 PM
Is there any tutorials that shows me how to this kind of thing with the .py file?
Title: Re: Changing Bridge Animations
Post by: MLeo on January 31, 2008, 07:12:51 PM
Have you tried opening a .py (not .pyc) file up?
Try opening the file I mentioned and see what you can make up out of it.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 01, 2008, 10:24:20 AM
Yeah I open the PY file and started playing around with it. I wanted to make my bridge like the Galaxy bridge in KM 1.0 when you go to red alert and make all the top lighting to blue. Anyway I followed the same pattern with the .py files for both bridges. Of course I changed the name of the bridge locations etc and made the extra textures but it didn't seem to work at all. Here's the .py file. The red maps part is what i changed.

Code: [Select]
import Foundation

# Uncomment the below to enable!
Foundation.BridgeDef('Galaxy Refit', 'galaxyrefitbridge', dict = {
'modes': [ Foundation.MutatorDef.Stock ],
'locations': {
'galHelm': [ 'data/animations/gal_stand_h_m.nif', 'gal_stand_h_m' ],
'galTactical': [ 'data/animations/gal_seated_t_l.nif', 'gal_seated_t_l' ],
'galCommander':[ 'data/animations/gal_stand_c_m.nif', 'gal_stand_c_m' ],
'galScience': [ 'data/animations/gal_stand_S_S.nif', 'gal_stand_s_s' ],
'galEngineer': [ 'data/animations/gal_stand_e_s.nif', 'gal_stand_e_s' ],
'galGuest': [ 'data/animations/gal_stand_X_m.nif', 'gal_stand_X_m' ],
'galL1S': [ 'data/animations/gal_L1toG3_S.nif', 'gal_L1toG3_s', 'pCharacter.SetHidden(1)' ],
'galL1M': [ 'data/animations/gal_L1toG3_M.nif', 'gal_L1toG3_M', 'pCharacter.SetHidden(1)' ],
'galL1L': [ 'data/animations/gal_L1toG3_L.nif', 'gal_L1toG3_L', 'pCharacter.SetHidden(1)' ],
'galL2M': [ 'data/animations/gal_L2toG1_M.nif', 'gal_L2toG1_M', 'pCharacter.SetHidden(1)' ],
'galL3M': [ 'data/animations/gal_L2toG2_M.nif', 'gal_L3toG1_M', 'pCharacter.SetHidden(1)' ],
'galG1M': [ 'data/animations/gal_G1toL2_M.nif', 'gal_G1toL2_M' ],
'galG2M': [ 'data/animations/gal_G2toL2_M.nif', 'gal_G2toL2_M' ],
'galG3M': [ 'data/animations/gal_G3toL1_M.nif', 'gal_G3toL1_M' ],
'galXT01': [ 'data/animations/gal_seated_XT01.NIF', 'gal_seated_XT01'],
'galXT02': [ 'data/animations/gal_seated_XT02.NIF', 'gal_seated_XT02'],
'galXT03': [ 'data/animations/gal_standing_XT03.NIF', 'gal_standing_XT03'],
},
'Maps':{
'CurrentMaps': {'g_imp_pannels-state01': "g_imp_pannels-state01"},
'GreenMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state01.tga'},
'YellowMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state02.tga'},
'RedMaps':{'g_imp_pannels-state01': [1, {1: 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state03.tga', 2: 'data/Models/Sets/Galaxy/black.tga',}]},
'Map 5' : 'data/Models/Sets/GalaxyRefit/High/Map 5r.tga',
'Map 13' : 'data/Models/Sets/GalaxyRefit/High/Map 13r.tga',
'Map 35' : 'data/Models/Sets/GalaxyRefit/High/Map 35r.tga',
'NormalMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state01.tga'},
},
"bridgeSound": {
"LiftDoor": {"volume": 1.0,"file": "sfx/gengal/dbdoor.wav", "group": "BridgeGeneric"},
"AmbBridge": {"volume": 0.3,"file": "sfx/gengal/dbamb.wav", "group": "BridgeGeneric"},
"RedAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbklaxton.wav", "group": "BridgeGeneric"},
"YellowAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbyellow.wav", "group": "BridgeGeneric"},
"GreenAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbgreen.wav", "group": "BridgeGeneric"},
"ViewOn": {"volume": 1.0,"file": "sfx/gengal/dbviewscreenon.wav", "group": "BridgeGeneric"},
"ViewOff": {"volume": 1.0,"file": "sfx/gengal/dbviewscreenoff.wav", "group": "BridgeGeneric"}
},
"LoadingScreen": "data/Icons/LoadingScreens/GenGalaxyLoading.tga",
} )

[MLeo EDIT] Please use code tags when posting code.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 01, 2008, 10:30:03 AM
And you are experiencing a problem? :?
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 01, 2008, 10:32:56 AM
Sorry I forgot to tell what the problem was lol. Yeah nothing happens to the red alert lights when i go to red alert. They stay the same as before.
Title: Re: Changing Bridge Animations
Post by: Bones on February 01, 2008, 11:11:26 AM
You haven't added maps that should be swaped into 'current maps' yours looks like this
Code: [Select]
'CurrentMaps': {'g_imp_pannels-state01': "g_imp_pannels-state01"}, and it should look like this for example if you want map 5 to be swaped
Code: [Select]
{'g_imp_pannels-state01': "g_imp_pannels-state01", "Map 5" : "Map 5", },
also you have to add _red to each map name at the end to get it working for example map 5 will be 'map 5_red.tga'
Title: Re: Changing Bridge Animations
Post by: MLeo on February 01, 2008, 11:23:29 AM
It isn't required, it's good practise.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 01, 2008, 11:24:40 AM
Are you sure they aren't nif animated maps?
Are you pointing to the right locations?
Do you have the maps you are pointing to?
Title: Re: Changing Bridge Animations
Post by: Bones on February 01, 2008, 11:50:28 AM
so you say that I don't actually need to add "mapname" : "mapname" into current maps to have swaping working ? recently I almost blew my pc to get map swaping working properly LOL, even smallest typo and you get BSOD
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 01, 2008, 11:59:22 AM
1. Dunno
2. Think So
3. Yes

A lot of the maps are the same as the standard galaxy ones. A lot of them are even named the same. Do you have an example script that I can work off because I can't seem to see where I went wrong?

Thanks.
Title: Re: Changing Bridge Animations
Post by: Bones on February 01, 2008, 02:00:30 PM
try to replace your plugin with this one :
Code: [Select]
import Foundation

# Uncomment the below to enable!
Foundation.BridgeDef('Galaxy Refit', 'galaxyrefitbridge', dict = {
'modes': [ Foundation.MutatorDef.Stock ],
'locations': {
'galHelm': [ 'data/animations/gal_stand_h_m.nif', 'gal_stand_h_m' ],
'galTactical': [ 'data/animations/gal_seated_t_l.nif', 'gal_seated_t_l' ],
'galCommander':[ 'data/animations/gal_stand_c_m.nif', 'gal_stand_c_m' ],
'galScience': [ 'data/animations/gal_stand_S_S.nif', 'gal_stand_s_s' ],
'galEngineer': [ 'data/animations/gal_stand_e_s.nif', 'gal_stand_e_s' ],
'galGuest': [ 'data/animations/gal_stand_X_m.nif', 'gal_stand_X_m' ],
'galL1S': [ 'data/animations/gal_L1toG3_S.nif', 'gal_L1toG3_s', 'pCharacter.SetHidden(1)' ],
'galL1M': [ 'data/animations/gal_L1toG3_M.nif', 'gal_L1toG3_M', 'pCharacter.SetHidden(1)' ],
'galL1L': [ 'data/animations/gal_L1toG3_L.nif', 'gal_L1toG3_L', 'pCharacter.SetHidden(1)' ],
'galL2M': [ 'data/animations/gal_L2toG1_M.nif', 'gal_L2toG1_M', 'pCharacter.SetHidden(1)' ],
'galL3M': [ 'data/animations/gal_L2toG2_M.nif', 'gal_L3toG1_M', 'pCharacter.SetHidden(1)' ],
'galG1M': [ 'data/animations/gal_G1toL2_M.nif', 'gal_G1toL2_M' ],
'galG2M': [ 'data/animations/gal_G2toL2_M.nif', 'gal_G2toL2_M' ],
'galG3M': [ 'data/animations/gal_G3toL1_M.nif', 'gal_G3toL1_M' ],
'galXT01': [ 'data/animations/gal_seated_XT01.NIF', 'gal_seated_XT01'],
'galXT02': [ 'data/animations/gal_seated_XT02.NIF', 'gal_seated_XT02'],
'galXT03': [ 'data/animations/gal_standing_XT03.NIF', 'gal_standing_XT03'],
},
'Maps':{
'CurrentMaps': {'g_imp_pannels-state01': "g_imp_pannels-state01", "map 5" : "map 5", "map 13" : "map 13", "map 35" : "map 35", },
'GreenMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state01.tga'},
'YellowMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state02.tga'},
'RedMaps':{'g_imp_pannels-state01': [1, {1: 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state03.tga', 2: 'data/Models/Sets/Galaxy/black.tga',}]},
'Map 5' : 'data/Models/Sets/GalaxyRefit/High/Map 5_red.tga',
'Map 13' : 'data/Models/Sets/GalaxyRefit/High/Map 13_red.tga',
'Map 35' : 'data/Models/Sets/GalaxyRefit/High/Map 35_red.tga'},
'NormalMaps':{'g_imp_pannels-state01': 'data/Models/Sets/GalaxyRefit/High/g_imp_pannels-state01.tga'},
},
"bridgeSound": {
"LiftDoor": {"volume": 1.0,"file": "sfx/gengal/dbdoor.wav", "group": "BridgeGeneric"},
"AmbBridge": {"volume": 0.3,"file": "sfx/gengal/dbamb.wav", "group": "BridgeGeneric"},
"RedAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbklaxton.wav", "group": "BridgeGeneric"},
"YellowAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbyellow.wav", "group": "BridgeGeneric"},
"GreenAlertSound": {"volume": 1.0,"file": "sfx/gengal/dbgreen.wav", "group": "BridgeGeneric"},
"ViewOn": {"volume": 1.0,"file": "sfx/gengal/dbviewscreenon.wav", "group": "BridgeGeneric"},
"ViewOff": {"volume": 1.0,"file": "sfx/gengal/dbviewscreenoff.wav", "group": "BridgeGeneric"}
},
"LoadingScreen": "data/Icons/LoadingScreens/GenGalaxyLoading.tga",
} )

but be sure you rename map 5, map 13 and map 35 to map 5_red, map 13_red, map 35_red, it should work then, good luck
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 01, 2008, 02:56:26 PM
Thanks a lot. I'll give that a try
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 02, 2008, 06:52:25 AM
Well I used the script and now I have a BSOD every time I start BC. I can't see how that file would be related to it but it's the only change i've made since last time I played it. BTW, i've tried deleting options.cfg.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 02, 2008, 09:07:33 AM
A BSOD has nothing to do with options.cfg.

Open the console (start in -TestMode first) and see what _is_ wrong.
Title: Re: Changing Bridge Animations
Post by: Bones on February 02, 2008, 09:23:26 AM
It has to be something related to the file I made, most likely typo :D... will be better if you try make new one.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 02, 2008, 09:43:17 AM
One typo I see at first glance is the extra } at the end of RedMaps (see the sequece of '}]},'? It ought to be '}],', without the '' of course).
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 02, 2008, 10:49:49 AM
Well I went into testmode and here's what I got.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 02, 2008, 11:17:43 AM
Atleast it shows the error.

Which KM version are you using?
That line isn't present in the file I got from KM1.0.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 02, 2008, 01:41:03 PM
I'm using KM 1.0.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 02, 2008, 03:07:47 PM
Well, that line isn't present on my version.
Put the attached file in scripts/Custom/Autoload

It's fresh from the zip.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 02, 2008, 03:19:48 PM
Thanks a lot MLeo but still no luck. Is it even related to the scrpt that Bones sent me?
Title: Re: Changing Bridge Animations
Post by: MLeo on February 02, 2008, 03:25:23 PM
Possibly, did you change what I mentioned a couple of posts back?

Also, did the BSOD message change?
Title: Re: Changing Bridge Animations
Post by: Bones on February 02, 2008, 04:17:11 PM
I've been running some tests on this plugin and none had worked succesfully... strange, it must be something wrong with the script I gave you, when you'll revert it to original game will work again, I know cuz I just checked that so the problem is in refit galaxy bridge plugin.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 02, 2008, 05:14:44 PM
Hmm strange. I'll copy the origional over now. I'll let you's know how it tuned out.
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 03, 2008, 06:52:32 AM
Well i copied the origional .py file in /scipts/custom/autoload and still the same problem. When you say plugin do you mean the whole bridge.
Here's the new error message.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 03, 2008, 07:01:23 AM
Right, I suggest you ask at the KM forums about this. Since I can't find anything syntacticly wrong with it.
Title: Re: Changing Bridge Animations
Post by: Bones on February 03, 2008, 08:28:08 AM
nope I only reverted one particular file and it worked, I'm wondering why you're getting error from that Timeblahblah.py it has nothing to do with this bridge, isn't it ?
Title: Re: Changing Bridge Animations
Post by: MLeo on February 03, 2008, 01:44:25 PM
nope I only reverted one particular file and it worked, I'm wondering why you're getting error from that Timeblahblah.py it has nothing to do with this bridge, isn't it ?
It can simply mean 2 things, one, an error in the bridge file had secondary effects in another one (this case TimeMeasurement, because other scripts didn't load correctly before it) or that it already had an error. Why do I think this?
If you look at the console report you will see at the top part of another one (or atleast, it looks like one).
Title: Re: Changing Bridge Animations
Post by: ChronowerX_GT on February 03, 2008, 03:59:43 PM
Hmm it's strange. I've replaced the whole bridge and the file you sent me Mleo and still it doesn't work.
Title: Re: Changing Bridge Animations
Post by: MLeo on February 03, 2008, 05:20:29 PM
Still a similar console report I suppose?