Issue with game_menu

正在查看此主题的用户

状态
不接受进一步回复。

Bustah

Regular
Hello. I am very new to modding and have an annoying issue. I am using ModSys.

I plan to make a total conversion of sorts but am currently just revamping the character creation a little bit.

Here is the new character creation code in module_game_menus.py (I have edited more though, and if there isn't any perceivable issue here I can post the rest of my start_game_1)

(
"start_character_5",mnf_disable_all_keys,
"Lastly, your personality was shaped by these many years. What kind of person are you?",
"none",
[],
[
  ("aggressive",[],"Aggressive and wreckless.",[
(assign,"$background_answer_5",cb5_aggressive),
(jump_to_menu,"mnu_choose_skill"),
]),
  ("kind",[],"Kind and naive.",[
(assign,"$background_answer_5",cb5_kind),
(jump_to_menu,"mnu_choose_skill"),
]), 
  ("brave",[],"Brave and stoic.",[
(assign,"$background_answer_5",cb5_brave),
(jump_to_menu,"mnu_choose_skill"),
]),
  ("greedy",[],"Greedy and deceitful.",[
(assign,"$background_answer_5",cb5_greedy),
(jump_to_menu,"mnu_choose_skill"),
]),
  ("patriot",[],"Patriotic and conservative.",[
(assign,"$background_answer_5",cb5_patriot),
(jump_to_menu,"mnu_choose_skill"),
]),
  ("cheerful",[],"Cheerful and dull.",[
(assign,"$background_answer_5",cb5_cheerful),
(jump_to_menu,"mnu_choose_skill"),
]),
  ("witty",[],"Witty and reclusive.",[
(assign,"$background_answer_5",cb5_witty),
(jump_to_menu,"mnu_choose_skill"),
]),
]
  ),

And when I go to compile, I get this error.
Traceback (most recent call last):
  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,quick_strings)
  File "process_game_menus.py", line 27, in save_game_menus
    save_statement_block(ofile,0,1, game_menu[4]  , variable_list, variable_uses,tag_uses,quick_strings)
  File "C:\ModSys\Module_system 1.171\process_operations.py", line 449, in save_statement_block
    save_statement(ofile,opcode,no_variables,statement,variable_list,variable_uses,local_vars, local_var_uses,tag_uses,quick_strings)
  File "C:\ModSys\Module_system 1.171\process_operations.py", line 398, in save_statement
    ofile.write("%d %d "%(opcode, lenstatement))
TypeError: %d format: a number is required, not str

By the way, I have defined all the cb5_x variables in module_constants.py. However, when defining them I noticed that the other variable's numerical definitions seemed random. Is this the case? I just defined them in numerical order. (cb5_aggressive = 1, cb5_kind = 2, etc.).

I scoured this forum and the internet for a solution, and found a post from 6 years ago, but it didn't help and I didn't want to post to a 6-year-old 2-reply-long thread.

If anyone could have a look and see what I'm doing wrong that would be greatly appreciated.  :smile:
 
Bustah 说:
I scoured this forum and the internet for a solution, and found a post from 6 years ago, but it didn't help and I didn't want to post to a 6-year-old 2-reply-long thread.
That would be preferable.
It's better to necro and continue similar old threads than spam the forum with new ones.

Also there is Q&A Thread for small questions:
https://forums.taleworlds.com/index.php/topic,6575.0.html

The code you posted seems correct and compiles just fine.
The error is someplace else.
 
Leonion 说:
It's better to necro and continue similar old threads than spam the forum with new ones.

It's just that 1 of the people posting was a guest and the other hasn't been active in months... sorry for starting a new thread but I thought it was necessary. I'll avoid it I guess.

Leonion 说:
Also there is Q&A Thread for small questions:
https://forums.taleworlds.com/index.php/topic,6575.0.html

The code you posted seems correct and compiles just fine.
The error is someplace else.

OK thank you for linking me there. It doesn't seem to have an answer so should I just repost this there? Sorry I don't really know much about forum etiquette this is the first forum I've ever really been a part of and that was my first post. I could post the rest of the code in module_game_menus.py if you would like?
 
Posting the whole game_menus code would be too much. :smile:

You need to think about what else you edited.

And do your constants look like this?
cb5_aggressive = 1
cb5_kind = 2
cb5_brave = 3
cb5_greedy = 4
cb5_patriot = 5
cb5_cheerful = 6
cb5_witty = 7
 
Yes, my constants look exactly like that. I could post everything I've edited, but that's about 400 lines of code (although most of it is just text for the menus).

I've been looking over them and I really can't seem to find anything wrong. The error I'm getting isn't for syntax or anything stupid like that and I've checked all the other things...

I will post the code. Look at it if you want to, don't if you don't.

("start_noble",[],"A landless noble.",[
      (assign,"$background_type",cb_noble),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@You came into the world a {reg3?daughter:son} of landless nobility,\
owning only the house in which they lived. However, despite your family's hardships,\
they afforded you a good education and trained you from childhood for the rigors of aristocracy and life at court."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_merchant",[],"A successful merchant.",[
      (assign,"$background_type",cb_merchant),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@You were born the {reg3?daughter:son} of a rich merchant,\
always searching for new opportunities for profit. Although your parents were wealthier than most\
and educated you as well as they could, you found little opportunity to make friends on the road,\
living mostly for the moments when you could sell something to somebody."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_retainer",[],"A baron's retainer.",[
      (assign,"$background_type",cb_retainer),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@As a child, your family scrabbled out a meagre living from your father's wages\
as a retainer to the local lord. It was not an easy existence, and you were too poor to get much of an\
education. You learned mainly how to defend yourself on the streets, with or without a weapon in hand."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_hunter",[],"A hunter.",[
      (assign,"$background_type",cb_hunter),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@{reg3?daughter:son}"),
      (str_store_string,s10,"@You were the {reg3?daughter:son} of a family who lived off the woods,\
doing whatever they needed to make ends meet. Hunting, woodcutting, making arrows,\
even a spot of poaching whenever things got tight. Winter was never a good time for your family\
as the cold took animals and people alike, but you always lived to see another dawn,\
though your brothers and sisters might not be so fortunate."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_nomad",[],"A steppe nomad.",[
      (assign,"$background_type",cb_nomad),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@{reg3?daughter:son}"),
      (str_store_string,s10,"@You were a child of the steppe, born to a tribe of wandering nomads who lived\
in great camps throughout the arid grasslands.\
Like the other tribesmen, your family revered horses above almost everything else, and they taught you\
how to ride almost before you learned how to walk. "),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_thief",[],"A thief.",[
      (assign,"$background_type",cb_thief),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@As the {reg3?daughter:son} of a thief, you had very little 'formal' education.\
Instead you were out on the street, begging until you learned how to cut purses, cutting purses\
until you learned how to pick locks, all the way through your childhood.\
Still, these long years made you streetwise and sharp to the secrets of cities and shadowy backways."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_smith",[],"A master smith.",[
      (assign,"$background_type",cb_smith),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@As the {reg3?daughter:son} son of a smith, you spent most of your time\
tinkering with and crafting objects alongside your father.\
Though you learned how to create objects of use from raw\
materials, you did recieve much else in terms of education.\
Still, the lessons your father taught you in making and selling goods would surely help you in the business world."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_peasant",[],"A simple peasant.",[
      (assign,"$background_type",cb_peasant),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@Life as the {reg3?daughter:son} of a peasant was boring but not too harsh.\
You spent much of your childhood helping out your parents on the field, learning\
valuable agricultural skills. You also helped your parents sending goods to market.\
Much, if not all, of your free time was spent playing in the village.\
Things got tough every now and then, especially when wars began, but you managed to scrape out a decent childhood."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("start_serf",[],"A lowly serf.",[
      (assign,"$background_type",cb_serf),
      (assign, reg3, "$character_gender"),
      (str_store_string,s10,"@Life as the {reg3?daughter:son} of a serf was harsh and precarious.\
You spent your childhood helping your parents on the lords fields, while keeping little for yourselves.\
While you learned very quickly the ins and outs of agriculture, you learned little else,\
and went to sleep hungry most nights."),
(jump_to_menu,"mnu_start_character_2"),
    ]),
    ("go_back",[],"Go back",
    [(jump_to_menu,"mnu_start_game_1"),
    ]),
    ]
  ),
  (
    "start_character_2",0,
    "{s10}^^ As you grew into an adolescent, your life began to take shape. You became...",
    "none",
    [],
    [
      ("page",[
          ],"A noble's assistant.",[
      (assign,"$background_answer_2", cb2_page),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\
you were sent to live in the court of one of the nobles of the land.\
There, your first lessons were in humility, as you waited upon the lords and ladies of the household.\
But from their chess games, their gossip, even the poetry of great deeds and courtly love, you quickly began to learn about the adult world of conflict\
and competition. You also learned from the rough games of the other children, who battered at each other with sticks in imitation of their elders' swords."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("apprentice",[
          ],"A craftsman's apprentice.",[
      (assign,"$background_answer_2", cb2_apprentice),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\
you apprenticed with a local craftsman to learn a trade. After years of hard work and study under your\
new master, he promoted you to journeyman and employed you as a fully paid craftsman for as long as\
you wished to stay."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("stockboy",[
          ],"A clerk at a shop.",[
      (assign,"$background_answer_2",cb2_stockboy),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\
you worked the shop of a wealthy merchant, spending your days storing and selling goods.\
You soon became adept at the art of buying low, selling high, and leaving the customer thinking they'd\
got the better deal."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("urchin",[
          ],"A street urchin.",[
      (assign,"$background_answer_2",cb2_urchin),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\
you took to the streets, doing whatever you must to survive.\
Begging, thieving and working for gangs to earn your bread, you lived from day to day in this violent world,\
always one step ahead of the law and those who wished you ill."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("nomad",[
          ],"A steppe child.",[
      (assign,"$background_answer_2",cb2_steppe_child),
      (assign, reg3, "$character_gender"),
      (str_store_string,s11,"@As a {reg3?girl:boy} growing out of childhood,\
you rode the great steppes on a horse of your own, learning the ways of the grass and the desert.\
Although you sometimes went hungry, you became a skillful hunter and pathfinder in this trackless country.\
Your body too started to harden with muscle as you grew into the life of a nomad {reg3?woman:man}."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("mummer",[],"A mummer.",[
      (assign,"$background_answer_2",cb2_mummer),
      (assign, reg3, "$character_gender"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@{reg3?girl:boy}"),
      (str_store_string,s11,"@As a {s12} growing out of childhood,\
you attached yourself to a troupe of wandering entertainers, going from town to town setting up mummer's\
shows. It was a life of hard work, selling, begging and stealing your living from the punters who flocked\
to watch your antics. Over time you became a performer well capable of attracting a crowd."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("peasant",[],"A peasant child.",[
      (assign,"$background_answer_2",cb2_peasant),
      (assign, reg3, "$character_gender"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@{reg3?girl:boy}"),
      (str_store_string,s11,"@As a {s12} growing out of childhood,\
you spent your time in the fields, working away.\
Though it was rare to see a coin in your pocket you lived a decent life, and became a skilled farmer.\
You spent the rest of your time with your friends, playing war and growing strong."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("follower",[],"An army follower.",[
      (assign,"$background_answer_2",cb2_follower),
      (assign, reg3, "$character_gender"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@{reg3?girl:boy}"),
      (str_store_string,s11,"@As a {s12} growing out of childhood,\
you and your family followed noble armies and helped with their washing,\
cleaning their weapons, serving up meals, and tending the wounded.\
You learned a lot of valuable skills, but life's difficulty went up and down\
with the fortune of the army you followed."),
(jump_to_menu,"mnu_start_character_3"),
    ]),
      ("go_back",[],"Go back.",
    [(jump_to_menu,"mnu_start_character_1"),
    ]),
    ]
  ),
  (
    "start_character_3",mnf_disable_all_keys,
    "{s11}^^ Then, as a young adult, life changed as it always does. You became...",
    "none",
    [(assign, reg3, "$character_gender"),],
    [
      ("merc",[],"A mercenary.",[
        (assign,"$background_answer_3",cb3_mercenary),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
You signed on with a mercenary company and travelled far from your home. The life you found was rough and\
dangerous, often finding yourself wounded or lost after a defeat.\
Yet, you would go on to find another company and begin the cycle again, honing your skills and learning the art of war."),
(jump_to_menu,"mnu_start_character_4"),
        ]),

      ("squire",[(eq,"$character_gender",tf_male)],"A squire.",[
        (assign,"$background_answer_3",cb3_squire),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {reg3?woman:man}, and the whole world seemed to change around you.\
When you were named squire to a noble at court, you practiced long hours with weapons,\
learning how to deal out hard knocks and how to take them, too.\
You were instructed in your obligations to your lord, and of your duties to those who might one day be your vassals.\
But in addition to learning the chivalric ideal, you also learned about the less uplifting side\
-- old warriors' stories of ruthless power politics, of betrayals and usurpations,\
of men who used guile as well as valor to achieve their aims."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("lady",[(eq,"$character_gender",tf_female)],"A lady-in-waiting.",[
        (assign,"$background_answer_3",cb3_lady_in_waiting),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
You joined the tightly-knit circle of women at court, ladies who all did proper ladylike things,\
the wives and mistresses of noble men as well as maidens who had yet to find a husband.\
However, even here you found politics at work as the ladies schemed for prominence and fought each other\
bitterly to catch the eye of whatever unmarried man was in fashion at court.\
You soon learned ways of turning these situations and goings-on to your advantage. With it came the\
realisation that you yourself could wield great influence in the world, if only you applied yourself\
with a little bit of subtlety."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("troubadour",[],"A troubadour.",[
        (assign,"$background_answer_3",cb3_troubadour),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
You set out on your own with nothing except the instrument slung over your back and your own voice.\
It was a poor existence, with many a hungry night when people failed to appreciate your play,\
but you managed to survive on your music alone. As the years went by you became adept at playing the\
drunken crowds in your taverns, and even better at talking anyone out of anything you wanted."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("student",[],"A university student.",[
        (assign,"$background_answer_3",cb3_student),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {reg3?woman:man}, and the whole world seemed to change around you.\
You found yourself as a student in the university of one of the great cities,\
where you studied theology, philosophy, and medicine.\
But not all your lessons were learned in the lecture halls.\
You may or may not have joined in with your fellows as they roamed the alleys in search of wine, women, and a good fight.\
However, you certainly were able to observe how a broken jaw is set,\
or how an angry townsman can be persuaded to set down his club and accept cash compensation for the destruction of his shop."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("cotter",[],"A cotter on the lord's land.",[
        (assign,"$background_answer_3",cb3_cotter),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
Somehow, you ended up at the bottom of the barrel. Whether it was from your bad luck or inability to\
rise above circumstance, you became a cotter on the lords land. You owned nothing but your cottage, and\
worked for a lord who cared little for you or your wellbeing."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("peddler",[],"A shopkeep.",[
        (assign,"$background_answer_3",cb3_peddler),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
Heeding the call of the open road, you travelled from village to village buying and selling what you could.\
It was not a rich existence, but you became a master at haggling even the most miserly elders into\
giving you a good price. Soon, you knew, you would be well-placed to start your own trading empire..."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("craftsman",[],"A smith.",[
        (assign,"$background_answer_3", cb3_craftsman),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
You pursued a career as a smith, crafting items of function and beauty out of simple metal.\
As time wore on you became a master of your trade, and fine work started to fetch fine prices.\
With food in your belly and logs on your fire, you could take pride in your work and your growing reputation."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("poacher",[],"A game poacher.",[
        (assign,"$background_answer_3", cb3_poacher),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
Dissatisfied with common men's desperate scrabble for coin, you took to your local lord's own forests\
and decided to help yourself to its bounty, laws be damned. You hunted stags, boars and geese and sold\
the precious meat under the table. You cut down trees right under the watchmen's noses and turned them into\
firewood that warmed many freezing homes during winter. All for a few silvers, of course."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("farmer",[],"A farmer.",[
        (assign,"$background_answer_3", cb3_farmer),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
You spent your days in your shack or on the fields, of which you owned little.\
Any excess you made was traded amongst your neighbours and travelling merchants for wares, leaving\
you without a coin, as most people were."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("scribe",[],"A scribe at a monastery.",[
        (assign,"$background_answer_3", cb3_scribe),
      (str_store_string,s14,"@{reg3?daughter:man}"),
      (str_store_string,s13,"@{reg3?woman:man}"),
      (str_store_string,s12,"@Though the distinction felt sudden to you,\
somewhere along the way you had become a {s13}, and the whole world seemed to change around you.\
With a bit of luck and natural intelligence you managed to get in amongst a local monastery, where\
you learned to read and write. You spent your days amongst hundreds of manuscripts, filling your head\
with endless knowledge, some useful, some not so much.\
You earned nothing for this work, and had little to call a life beyond the walls of that library."),
(jump_to_menu,"mnu_start_character_4"),
        ]),
      ("go_back",[],"Go back.",
      [(jump_to_menu,"mnu_start_character_2"),
        ]
      ),
    ]
  ),

  (
    "start_character_4",mnf_disable_all_keys,
    "{s12}^^Over all these years, you had quite a bit of time to yourself. What did you spend this time doing?",
    "none",
    [],
    [
      ("crafting",[],"Crafting and working with tools.",[
        (assign,"$background_answer_4",cb4_crafting),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("agriculture",[],"Working with plants and animals.",[
        (assign,"$background_answer_4",cb4_agriculture),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("martial",[],"Martial arts.",[
        (assign,"$background_answer_4",cb4_martial),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("learning",[],"Learning.",[
        (assign,"$background_answer_4",cb4_learning),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("trade",[],"Buying and selling goods.",[
        (assign,"$background_answer_4",cb4_trade),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("entertaining",[],"Entertaining and inspiring others.",[
        (assign,"$background_answer_4",cb4_entertaining),
        (jump_to_menu,"mnu_start_character_5"),
        ]),
      ("go_back",[],"Go back.",
      [(jump_to_menu,"mnu_start_character_3"),
        ]
      ),
    ]
  ),

I've taken out start_character_5 for obvious reasons.

Thanks for helping by the way, I was hoping to have a lot more done by now but this has totally stumped me and I can't compile or test anything in game :sad:

Edit: also here are my constants in module_constants.py
# character backgrounds
cb_noble = 1
cb_merchant = 2
cb_retainer = 3
cb_hunter = 4
cb_nomad = 5
cb_thief = 6
cb_smith = 7
cb_peasant = 8
cb_serf = 9

cb2_page = 1
cb2_apprentice = 2
cb2_stockboy  = 3
cb2_urchin = 4
cb2_steppe_child = 5
cb2_mummer = 6
cb2_peasant = 7
cb2_follower = 8

cb3_mercenary = 1
cb3_cotter = 2
cb3_farmer = 6
cb3_poacher = 3
cb3_craftsman = 4
cb3_peddler = 5
cb3_troubadour = 7
cb3_squire = 8
cb3_lady_in_waiting = 9
cb3_student = 10
cb3_scribe = 11

cb4_crafting = 1
cb4_agriculture = 2
cb4_martial =  3
cb4_learning = 4
cb4_trade = 5
cb4_entertaining = 6

cb5_aggressive = 1
cb5_kind = 2
cb5_brave = 3
cb5_greedy = 4
cb5_patriot = 5
cb5_cheerful = 6
cb5_witty = 7
 
I don't see any obvious errors. Perhaps it's just some stupid extra/missing bracket somewhere.
Make a backup copy and try emptying your menus, like:
插入代码块:
  (
    "start_character_2",0,
    "{s10}^^ As you grew into an adolescent, your life began to take shape. You became...",
    "none",
    [],
    []
  ),
and recompile the modsys every time to narrow down the cause.
Try removing menus one by one.

Searching for bugs often requires such measures. If you want to make a total conversion, you'll have to deal with this a lot, so why not start now.
 
You're right, I can't be lazy if I want to make this.

I'll go through every line until I fix this. Don't be surprised if I have nothing for the next 12 hours because it is kind of 2am.

Thanks a lot for helping with the code and with the forum stuff, it's sort of overwhelming with all the menus and terminology.

Edit: OK apparently the error has nothing to do with the character creation but the skills? I decided to actually read the wall of text the compiler spits out when it gives me the initial error and it seems to be stemming from "choose_skills," which I have barely, and I mean barely edited. Literally just changed 6 variable names. Anyways I went and got a fresh version of game_menus.py and extracted the "choose_skills" menu, pasted it into my modded version and it compiled.

What happened will forever be a mystery to me.
 
状态
不接受进一步回复。
后退
顶部 底部