搜索结果: *

  1. Changing center leader/merchant races mid-game. (RESOLVED)

    Good to hear that.
    And your code will be a good tutorial for me:smile:
  2. Questions about module_scripts [beginner, kind of]

    Those mighty slots...  I saw the tutorials, I saw your mindfreak. Even though i like it, there is a gap between the tutorials and that one. And i think i'm in the middle of there.

    I've got my functions working about how to gain trade experience, the balance between buy and sell etc. Your weekly system idea was what i was thinking also.
    Yet, I've got one uncertainty for where to define "the trade experience"
    I'm thinking of to put a global variable like "$tradex" Should i do this? If so, where is the best place to put it? I thought (assign, "$tradex", 0), in starting game menus, or starting game scripts.
    I've got the sequel fairly i think. Put an operation in sell_item like vall_add, tradex, func(multiplier)...
    Or should i not do this? Because of the slot? Can you help me about that please?

  3. Changing center leader/merchant races mid-game. (RESOLVED)

    I haven't tried it, but my procedure would be like this:
    -Add a race to module_skins. Let's say the race is "dwarf" If you've done with skins, skeletons etc...
    -Add tf_dwarf = 3 to header troops.
    -Go to the module_troops and search for "armor merchants", "tavern keepers" et cetera.
    After deciding what town will be dwarven town,
    ["town_1_weaponsmith", "Weaponsmith","{!}Weaponsmith",tf_hero|tf_randomize_face|tf_dwarf|tf_is_merchant, 0, 0, fac_commoners,[itm_linen_tunic,      itm_hide_boots,itm_straw_hat],def_attrib|level(2),wp(20),knows_inventory_management_10, face_code, face_code_2],
    And put tf_dwarf flag to every dwarf on that town.
    Or is it got to be that complicated?
  4. Modding ranged troops, weapons and skills

    You may want to see http://forums.taleworlds.com/index.php?topic=137970.0
    About the second question, I can't tell you anything further than 'very likely the answer is yes' by virtue of of the fact that i didn't understand single thing. Yet i have a feeling that the topic on the other side of the link above has your answer, yes. Age of empires... yeah, possibly yes.

    addendum in re Edit:
    As far as i can see, Skills in M&B usually works like gauges of handicap.
    This one is from module_scripts
      ("game_get_party_companion_limit",
        [
          (assign, ":troop_no", "trp_player"),

          (assign, ":limit", 30),
          (store_skill_level, ":skill", "skl_leadership", ":troop_no"),
          (store_attribute_level, ":charisma", ":troop_no", ca_charisma),
          (val_mul, ":skill", 5),
          (val_add, ":limit", ":skill"),
          (val_add, ":limit", ":charisma"),

          (troop_get_slot, ":troop_renown", ":troop_no", slot_troop_renown),
          (store_div, ":renown_bonus", ":troop_renown", 25),
          (val_add, ":limit", ":renown_bonus"),

          (assign, reg0, ":limit"),
          (set_trigger_result, reg0),
      ]),
    Find the script about what your skill does, then put some limits or bonuses for it. I'm afraid, some of the skill actions in the game are hardcoded. And I've never seen any practice about this before.
    So, you may want to start it simple.

    edit: lol
  5. Modding Q&A [For Quick Questions and Answers]

    Ildradil 说:
    A little question:

    I've been messing around with mod tools a lot and finally got something done. However i dont like the native "intro"
    How would i make a custom intro for my mod. Like u just choose gender and create the face u like and then u find urself in a similar situation like u find in with fire and sword tutorial. From a little skirmish

    I got no idea where to start from, but im sure that if someone tells me where to start i can manage to do it.... :smile:

    A long answer:
    First you need module system of course. No problem? Here we go;

    Check the module_game_menus.py Scroll down, you'll see the first menu which called "start_game_0" and says Welcome adventurer.
    Scroll down. You'll see the condition blocks of that menu which are "continue" and "go back".
    You'll see the operations for those conditions. "change_screen_quit" for "Go_back", and (jump_to_menu, "mnu_start_game_1") for "continue".
    "start_game_1" here, is our second window of the game starting menus. If you'll search for "start_game_1", you'll find that menu. In it's condition blocks, you'll find (jump_to_menu,"mnu_start_character_1"). Search for "start_character_1" and so on. At the end, not actual end, you'll find the menu "choose_skill", a real big one.
    You can add extra operations, delete some operations or delete an entire menu with caution of course. You can add an operation which jumps directly to the menu "choose_skill" from the first menu "start_game_0". You can do lots of things here.

    Go back the top of module_game_menus. Scroll down again, this time skip  "start_game_0". The second menu is "start_phase_2" . In it's conditions, you'll find the operation which jumps to "mnu_start_phase_2_5" Search for "start_phase_2_5"   (Those are where you choose a town to spawn, kill a bandit and meet the merchant in Warband.) After et cetera, find "start_phase_4" which has lots of operations including 
    (set_jump_mission, "mt_meeting_merchant"),
    (jump_to_scene, ":town_room_scene"), 
     
    Either you can change it to the menu you want to hop out (i guess it can't be done smoothly just with typing another screen name there. You should manage the talkers and walkers etc correctly.)
    or you can find the "meeting_merchant" mission in the module_mission_templates.py with the abilities of putting your party on the map with "ti_tab_pressed". which might be considered as the end of the beginning.

    EDIT:
    You are welcome.
  6. Questions about module_scripts [beginner, kind of]

        If what you are telling me is 'circa'; a=b, b=c, then a=c. I know that. If it is something more than that, it's okay. Someday I'll understand, hopefully. Don't bother here more.
    #What i was saying there, I used the variable price_factor, in the script_game_event_sell_item which i thought does not have that variable in itself. Now i'm looking at that script again, and i saw minimum_price_factor. I think that's about it. 
    What you think?  i)Hello, captain obvios?  ii)no, noo...    Anyways, no urgency for an answer here.

          Again i might've been misconstrued, but...
    #I think the game_get_item_buy&sell_price_factor scripts are not what i seek for.
    As far as i see, their variable pile there does not include anything about price differences born of city economies et cetera.
    I mean;
    #When i display the price factor in a message, it shows always the same price for one particular item.
    (Yet, it might not be true. But, display_message is the only way for me to comprehend what those codes mean to say.)
    -But on the other hand, game_event_sell_item's :multiplier is particularly what i want, i think.
    -E.g. If i can buy sausage cheap, from one particular town, it means that buying multiplier for sausage there, is low.
    Thence, i want to make player get trade_ex when {he/she} buys an item with low multiplier, and sells it with higher one.
    There is a difference with the wise trading and looting. (for the trade experience here of course.)

          Inventory hints seem to be useful. But they're really far from my understanding. I'll keep them, try to find some examples on module system. If you happen to make/come_across some tutorials about those, please let me know. I do seem to have lots of work.

          Thanks for your help and attention Zsar.



  7. Questions about module_scripts [beginner, kind of]

    #

    Thanks for the really helpful answers!

    I started to use WSE a couple of days ago. I used some basic commands, not much. I couldn't find any good tutorials for WSE too. Guess i need to figure out most of them myself. Like everyone does? Anyways.

    2-If that script does not mean anything more than (assign, reg1, reg0), how can it display the message which shows price_factor. Sorry, I'm confused here.

    That example code was just perfect explanatory Zsar.  Thanks very much.



    ####################

    A couple of months ago, i was struggling with a piece of code. In this forum again, i asked some questions about it. With lots of helpful suggestions i created something. Now I feel, i don't like it.

    The code is about getting trade experience with profitable trading. I used the scripts game_event_buy&sell_item. I used the ":multiplier" variables for calculating the profit approximately.

    The problem was when i put the item to merchant's inventory, then take it back and put it again and so on.. You know, it's cheating. Cause, the script activates whenever you put an item to merchants inventory, not really when you sell it.

    To prevent this, i used a function which makes buy and sell multipliers almost equal, and make another function that add_trade experience with selling, and sub_trade experience with buying.
    But that code is far from being perfect.
    It is not cool that you lost trade experience when you buy something.


    in a nutshell:

    What i want is to define what player has before and after the trade in his inventory, to see what items player has sold to merchant.


    I think, a code about that, could be very helpful for lots of things about trade.

    I've got some ideas. For example, I loot a Vaegir army, then sneaked into Reyvadin. I meet with a merchant and put a looted item to his inventory. And the guy startles, saying Oh my.. dude, what the hell? You..  It's just an example. But i think i can do lots of cool things with that.


    Can it be done?
    Thanks.

    #
  8. Questions about module_scripts [beginner, kind of]

    Hi. I have some questions about module system and python basics. Module_system tutorials does not include enough information about those things. Command database is also not explanatory as i want.                              #Sorry for bad python&English. 0-  Where is the optimal place to ask...
后退
顶部 底部