Help needed in creating a new base link
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
Help needed in creating a new base link
Hello,
I'm desperately looking for help.
I'm currently trying to create a link to a new, additional room within a base. I've tried about 20-30 variants by now, copied from Perry and Derelict, without success. I either get a no room error, only the bar link at the base room or all rooms but my new link. I wonder what I'm doing wrong cus it looks really easy. If someone has experience with base scripting please help me!
P.S.: I won't post any py because I have so much variants.
P.P.S.: Please no theories, I've had plenty of them for myself. Thanks.
I'm desperately looking for help.
I'm currently trying to create a link to a new, additional room within a base. I've tried about 20-30 variants by now, copied from Perry and Derelict, without success. I either get a no room error, only the bar link at the base room or all rooms but my new link. I wonder what I'm doing wrong cus it looks really easy. If someone has experience with base scripting please help me!
P.S.: I won't post any py because I have so much variants.
P.P.S.: Please no theories, I've had plenty of them for myself. Thanks.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
You might be having a python error.
You will want to look in your stderr.txt and search for "Traceback"
You will see something like:
If you don't understand what is causing, attach your python base file and paste your entire traceback error message.
Actually, attach your python file even if there isn't a traceback because you might be doing something else wrong. (What do you mean by so many variants? Sounds like you are just having a lot of python errors, but in different places in the file. Paste any one of the broken ones.)
I'm curious, did you use the base creator program to make it?
It's a standalone program you can compile in the "objconv" directory:
/svnroot/vegastrike/vegastrike/objconv/basemaker/
(actually, it's probably more work to get compiled and to figure it out than to hard-code it)
You will want to look in your stderr.txt and search for "Traceback"
You will see something like:
Code: Select all
Traceback (innermost call last):
main():
calling code
base.py, some line number:
some code
...
XxxError: something
Actually, attach your python file even if there isn't a traceback because you might be doing something else wrong. (What do you mean by so many variants? Sounds like you are just having a lot of python errors, but in different places in the file. Paste any one of the broken ones.)
I'm curious, did you use the base creator program to make it?
It's a standalone program you can compile in the "objconv" directory:
/svnroot/vegastrike/vegastrike/objconv/basemaker/
(actually, it's probably more work to get compiled and to figure it out than to hard-code it)
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
Here's my stderr - Note that there are some entries referring to the militia guild and not worth looking at. I can't find anything for myself.
And also a Heimdall.py - I've tried a new variant borrowed from Perry which uses Terell's Office as a base. With variants I mean that I really have no idea what I'm doing wrong and I'm trying and trying, without success.
I've further attached all associated py files - I hope you can help me. Maybe I get all those errors because just one little part of the whole chain is broken?
Oh, and I'm not using a base editor since notepad fulfills all of my needs - at least until now.
P.S. The base is already implemented in units.csv and works without the extra room.
Attachment deleted - I have to keep my upload quota low -
And also a Heimdall.py - I've tried a new variant borrowed from Perry which uses Terell's Office as a base. With variants I mean that I really have no idea what I'm doing wrong and I'm trying and trying, without success.
I've further attached all associated py files - I hope you can help me. Maybe I get all those errors because just one little part of the whole chain is broken?
Oh, and I'm not using a base editor since notepad fulfills all of my needs - at least until now.
P.S. The base is already implemented in units.csv and works without the extra room.
Attachment deleted - I have to keep my upload quota low -
Last edited by Dilloh on Sat Feb 03, 2007 8:12 pm, edited 1 time in total.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
@Dilloh,
I found two "Traceback" messages that were the same:
Looking the file, I can see that you need a comma after all the end parentheses.
Change:
To
The last one does not need a comma, but every one before the last must have a comma to separate it.
I deleted the comments because they were very cleverly hiding the missing commas by having real-looking code after them.
I found two "Traceback" messages that were the same:
Code: Select all
Traceback (most recent call last):
File "guildHQdaymilitia.py", line 26, in ?
File "C:\Programme\Privateer/bases/merchant_guild.py", line 3, in ?
import guilds
File "C:\Programme\Privateer/bases/guilds.py", line 195
'Militia' : Guild('Militia', 3, 5, ['Bounty', 'Defend'], 50000.00,[])#["militia"]) # no more tech, [] instead
^
SyntaxError: invalid syntax
Change:
Code: Select all
guilds={
'Merchant' : Guild('Merchant', 3, 5, ['Escort', 'Cargo' ], 1000.00,[]),#["merchant"]), #no more tech, [] instead
'Mercenary' : Guild('Mercenary', 3, 5, ['Bounty', 'Defend'], 5000.00,[])#["hunter"]) # no more tech, [] instead
'Militia' : Guild('Militia', 3, 5, ['Bounty', 'Defend'], 50000.00,[])#["militia"]) # no more tech, [] instead
}
Code: Select all
guilds={
'Merchant' : Guild('Merchant', 3, 5, ['Escort', 'Cargo' ], 1000.00,[]),
'Mercenary' : Guild('Mercenary', 3, 5, ['Bounty', 'Defend'], 5000.00,[]),
'Militia' : Guild('Militia', 3, 5, ['Bounty', 'Defend'], 50000.00,[])
}
I deleted the comments because they were very cleverly hiding the missing commas by having real-looking code after them.
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
Repost from "Hacking base files (split topic)"
Okay then thanks to ace123 and Melonhead, I now found out my problem.
I've been using a crappy guilds.py for weeks now, while I tried to implement the Militia Guild as a real guild, but I forgot about that soon. ace123 "reminded" me of this experiment again, it was the reason why I had nothing but the bar.
Thanks to Melonhead, I now don't have to repeat my experiments with room links again. I can now focus on completing canonHUDs1.32.
Thanks again guys!
Okay then thanks to ace123 and Melonhead, I now found out my problem.
I've been using a crappy guilds.py for weeks now, while I tried to implement the Militia Guild as a real guild, but I forgot about that soon. ace123 "reminded" me of this experiment again, it was the reason why I had nothing but the bar.
Thanks to Melonhead, I now don't have to repeat my experiments with room links again. I can now focus on completing canonHUDs1.32.
Thanks again guys!
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
@ace123 or anybody else who can help me out
Sorry to disturb you again, but I (think I) have a python error again.
I'm trying to create a campaign on my own and writing a test campaign. But I can't manage to implement it.
I've changed the line in campaigns.py from
to
to make sure camptroy.py is being loaded, without success. The game is stuck while creating the bar (ref to the topics before), so I can't leave the main concourse, but it's definitively because of the campaign for it happens at any base and the savegame is also ok.
Strange enough, pasting the whole thing directly into campaigns.py, e.g. replacing Sandovals mission, makes it working just fine.
I've attached the relevant files and would like to ask you to help me... I'm totally stuck. Thanks!
- Attachment deleted. Thanks for your help! -
Sorry to disturb you again, but I (think I) have a python error again.
I'm trying to create a campaign on my own and writing a test campaign. But I can't manage to implement it.
Code: Select all
File "C:\Programme\Privateer/modules/campaigns.py", line 2, in ?
import camptroy
File "C:\Programme\Privateer/modules/camptroy.py", line 32
DillohMission1) # The current mission node.
^
SyntaxError: invalid syntax
Code: Select all
campaignsloaders=[lambda:LoadMainCampaign(),lambda:LoadRFCampaign(),lambda:LoadRFMurphyCampaign(),lambda:LoadRFGoodinCampaign(),lambda:LoadRFTaylaCampaign(),lambda:LoadRFLynchCampaign(),lambda:campaign_bonus.LoadBonusCampaign()]
Code: Select all
campaignsloaders=[lambda:LoadMainCampaign(),lambda:LoadRFCampaign(),lambda:LoadRFMurphyCampaign(),lambda:LoadRFGoodinCampaign(),lambda:LoadRFTaylaCampaign(),lambda:LoadRFLynchCampaign(),lambda:campaign_bonus.LoadBonusCampaign(),lambda:camptroy.LoadTroyCampaign()]
Strange enough, pasting the whole thing directly into campaigns.py, e.g. replacing Sandovals mission, makes it working just fine.
I've attached the relevant files and would like to ask you to help me... I'm totally stuck. Thanks!
- Attachment deleted. Thanks for your help! -
Last edited by Dilloh on Tue Apr 10, 2007 7:00 pm, edited 1 time in total.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Sorry... my laptop didn't have a rar reader when I saw your message earlier.
Anyway, by running your file in python, I located the error...
After the long conversation, you need an end-bracket and a comma to go with the beginning bracket:
This gets rid of the syntax error at least.
In addition, make sure that the is indented at the end of the file if it belongs with the function.
Anyway, by running your file in python, I located the error...
After the long conversation, you need an end-bracket and a comma to go with the beginning bracket:
Code: Select all
("#996600By violent means, I suppose? What's your battery status?",True),
("#dd2200Close your eyes, stop your engines, lower your shields and we'll se about that."),
],
In addition, make sure that the
Code: Select all
return priv
-
- The Shepherd
- Posts: 5841
- Joined: Fri May 13, 2005 8:37 pm
- Location: Ottawa
- Contact:
Dilloh here is a good python IDE that i use has built in syntax checking as well as quick links to the python docs.http://drpython.sourceforge.net/
Enjoy the Choice
Enjoy the Choice
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2