Bridge Commander Central

BC Forums => BC Scripting => Topic started by: ACES_HIGH on November 16, 2008, 01:09:34 AM

Title: Galaxy Charts Era Plugin
Post by: ACES_HIGH on November 16, 2008, 01:09:34 AM
I'm trying to make an era plugin for the TOS era, but I've hit a bit of a problem, essentially, I've just been editing the ship names in the examples and stuff like that but BC has consistantly been rejecting it at start up, on the console report it says there are syntax errors, but most of them are in parts I didn't edit from the examples.

Code: [Select]
# prototype Era Plugin - handmade


##########  GENERAL ERA INFORMATION  ##########

Name = "TOS Era"
Description = ["The Mid 23rd century.", "Much of the galaxy remains unexplored, but the federation is in a state of cold war with the Klingons; the Romulans, recently returning from a century of seclusion behind the neutral zone are devious and fiercely territorial"]
StardateRange = [1111.1, 5555.9]


########## RACE INFORMATION ##########

RaceInfo = {

"Romulan": {
"myFriendlys": [],
"isEnemyToAll": 1,
"myShips": ["D7StudioRom", "Cricket", "CapsizeTD.py", "CrackerTD.py", "ChowderDM.py"],
"peaceVal": 0.0,
},

"Federation": {
"myFriendlys": [],
"isEnemyToAll": 1,
"myShips": ["Saladin", "Essex", "TOSAkira","Ptolemy","Ptolemy2","Ptolemy3","Type1","ConstitutionTOS","Constitution2ndPilot","Constitution1stPilot"],
"peaceVal": 1.0,
},
#
#"Tholian": {
# "myFriendlys": [ ],
# "isEnemyToAll": 1,
# "myShips": ["Tholian"],
# },
# "peaceVal": 0.0,
#},

"Klingon": {
"myFriendlys": [ ],
"isEnemyToAll": 1,
"myShips": ["D7Studio","D7Jein","KlingonD6","KlingonD5"],
"peaceVal": 0.5}


########## SYSTEM INFORMATION ##########

SystemInfo = {

}

Right now the report says there is a syntax error on that bracket on the last line, if I delete that, the error just moves up to the previous character.
Title: Re: Galaxy Charts Era Plugin
Post by: FekLeyr Targ on November 16, 2008, 06:18:48 AM
Have fun making my one obsolete. ;)


I think you get a better chance of getting help at the Galaxy Charts support forums:
http://bcs-tng.com/forums/index.php?board=81.0
Title: Re: Galaxy Charts Era Plugin
Post by: USS Frontier on November 16, 2008, 08:10:20 AM
I think you get a better chance of getting help at the Galaxy Charts support forums:
In this case not exactly, since this isn't a GC-specific problem, but just a normal scripting error.

Now about your problem, it's a missing bracket ( '}' )
The RaceInfo dictionary is not being "closed". Add a bracket ( '}' ) to the end of it, after that "Klingon" definition, right before the "###### SYSTEM INFORMATION ########" line.
Title: Re: Galaxy Charts Era Plugin
Post by: ACES_HIGH on November 16, 2008, 03:04:54 PM
Ok, I've stopped the BSOD, but what's the easiest way to trigger the defence force so I can see my new script in action
Title: Re: Galaxy Charts Era Plugin
Post by: USS Frontier on November 16, 2008, 05:52:05 PM
Just like you do in GC with other era plugins... Grab yourself a ship and warp to a hostile system. Seeing your code sample in the first post, and how all those races are enemy to all other races, then it shouldn't matter much which ship you choose lol, tho I still would recommend getting a romulan or klingon ship (one of those you put in the "myShips" list) and warping to a federation system, since the fedederation is the race with most systems under their control.

You might also wanna check the RDF's config in the Options menu, to fine tune it's chance of happening. Just change it to happen all the time.
Title: Re: Galaxy Charts Era Plugin
Post by: ACES_HIGH on November 16, 2008, 06:28:52 PM
thanks, it's working fine now