Recent content by Johao

  1. Modding Q&A [For Quick Questions and Answers]

    Quick question,

    I'm using Thorgrim's Map editor alongside with WarbandMagmanager in order to edit the map on Warband. As I created a new map, all of the map icons (village, castle, towns, etc) have been scattered, even to outside the red borders. I try to select those outside the red borders, some of them working normally and I was able to place them into my inner map borders, but other don't seem to be selected.

    Any help on this?
  2. Modding Q&A [For Quick Questions and Answers]

    Short Q,

      I've selected wheat from the Edit Mode in Warband. It's just a plant.

      Making a wheat field would mean about hundreds of wheat, and hundreds of props. Any convenient alternative that I'm missing out?
  3. Modding Q&A [For Quick Questions and Answers]

    jacobhinds said:

      Ah, that would have been extremely helpful, I now could understand some of the conditional operations that functioned with the part of the code you gave me. Excuse my lack of coding knowledge, Warband's the first game that I've ever dared go past 2D/3D artistry.

      Now that I've figured out the custom scenes part, I'm sort of left hollowed with a lack of any battle scenes, and searching the forums are either mostly castle scenes or multiplayer scenes. Anyone know of any OSPs that has single player battle scenes?

      Also, I noticed that map sizes that I've generated from edit mode aren't as big as random battle scenes. Is there a way to make it as big as the random scenes? I've places size x and y to max and put 5 metres for the polygon option, but it's still small.An oversight on my part
  4. Modding Q&A [For Quick Questions and Answers]

    Ok, apprently warband is very touchy about admin rights when it comes to creating new custom scenes.

    Now that I have familiarised myself with the scening battles and scripts, I've come to this part of the script where I have changed the random plains battle map to a custom scene.

    Code:
     ("setup_random_scene",
        [
          (party_get_current_terrain, ":terrain_type", "p_main_party"),
          (assign, ":scene_to_use", "scn_random_scene"),
          (try_begin),
            (eq, ":terrain_type", rt_steppe),
            (assign, ":scene_to_use", "scn_random_scene_steppe"),
          (else_try),
            (eq, ":terrain_type", rt_plain),
            (assign, ":scene_to_use", [i][b]"scn_multi_scene_1"[/b][/i], [u][b]"scn_multi_scene_2"[/b][/u]),
          (else_try),
            (eq, ":terrain_type", rt_snow),
            (assign, ":scene_to_use", "scn_random_scene_snow"),
          (else_try),
            (eq, ":terrain_type", rt_desert),
            (assign, ":scene_to_use", "scn_random_scene_desert"),
          (else_try),
            (eq, ":terrain_type", rt_steppe_forest),
            (assign, ":scene_to_use", "scn_random_scene_steppe_forest"),
          (else_try),
            (eq, ":terrain_type", rt_forest),
            (assign, ":scene_to_use", "scn_random_scene_plain_forest"),
          (else_try),
            (eq, ":terrain_type", rt_snow_forest),
            (assign, ":scene_to_use", "scn_random_scene_snow_forest"),
          (else_try),
            (eq, ":terrain_type", rt_desert_forest),
            (assign, ":scene_to_use", "scn_random_scene_desert_forest"),
          (else_try),
            (eq, ":terrain_type", rt_water),
            (assign, ":scene_to_use", "scn_water"),
          (else_try),
            (eq, ":terrain_type", rt_bridge),
            (assign, ":scene_to_use", "scn_random_scene_plain"),
          (try_end),
          (jump_to_scene,":scene_to_use"),
      ]),

    Now, this means that my custom map works in replacing the random_plains_scene, although I have no idea how to randomise multiple custom scenes. I tried adding a second custom map(multi_scene_2) along, but it does not work. How do you make it so that it randomises the custom maps?
  5. Modding Q&A [For Quick Questions and Answers]

    EliteFifty said:
    I am pretty new to modding and want to add another option for recruitment at a town - ie:// recruit your 5 swadian recruits for 50 denars but also have other basic troops available - so multiple tier 1 "recruit" level units. How can I go about doing this? In the python script it looked like there was only 1 spot for available troops at a center, so how could I add another/accomplish this?

    Try this tutorial:

    http://forums.taleworlds.com/index.php/topic,202029.0.html
  6. Modding Q&A [For Quick Questions and Answers]

    Two quick questions,

    1) How do you exactly 'save' a scene? What I did was follow the scening video tutorial by getting the terrain code and pasted on the "ruins" multiplayer map. I then delete the sceneobj file (multi_scene_1). I was able to get the edited terrain on the "ruins" map, but I have no idea how to pernamently save it afterwards. Since there is a missing multi_scene_1 file, my edited scene was lost.

    2) I take it to make a singleplayer battle scene, entry points should be 0 for the player/allies and 32 for the opposing faction?
  7. OSP Medieval Crusaders Way to Expiation - OSP Pack

    I'll try to make use of these resources If I can, if there is one thing I'd know Russians excel, it's making the coolest mods in my favourite games out there.
  8. Modding Q&A [For Quick Questions and Answers]

    jacobhinds said:
    The second code block I provided does exactly that. Go to module_scripts and find setup_random_scene. ":scene_to_use" is the local variable that gets chosen at the end of the code block. It's fairly self explanatory and you can make it random, or add a condition -- like the proximity to mountains -- I did.

    Ah ok, excuse my lazy mind, I should have look more into it before replying.

    I'm in a rush here so I'll try to summerize this while quick reading onto the code,

      So for each 'party' that is spawned in each part of the code indicates 1 direction of the squares of the world map around the player. (Assuming that this is related to the polygonal grids that one can see at the map editor), and the mountains detected thing will indicate whether or not the map will be spawned as a 'higher' variant of the set of maps.

      Now, I'm not sure of the next part, but I persume that means 1 out of the 8 directions will be chosen for the battle map. The second code will fill in which scene fits into which catergory of the terrain, and I believe the last part of the code is to get any random map if all else didnt work? I dont get the last part since it's the last else_try code.

    In short,
    - Identify 8 directions of terrain
    - Choose 1 randomly
    - Is that a mountain terrain?
    - Select map from 2nd code 


    Also:

    (eq, ":terrain_type", rt_snow_forest),
    (assign, ":scene_to_use", "scn_random_scene_snow_forest", "Blahblahblah add extra map here"),
    (else_try),

    I believe that I can add in extra maps on this line to allow map variations to randomize the custom battle scenes? I don't believe my interpretation will work usually....



  9. Modding Q&A [For Quick Questions and Answers]

    jacobhinds said:
    What you said.

    Ah ok, I think I have miswrote about my question, but that info is handy to know, thanks.

      I'd like to know how I can change the random generating battle scenes into custom ones. Instead of a random generated terrain, I can make the game select from a set of scenes depending on the terrain the player is at, and have a variety of those type of scenes so as not to always have the same scene for every battle. The ACOK mod actually did that with 50% chance of a custom scene in place. Can anyone tell me how is this achieved? I believe the options to edit the battle is at the module_missions_templates.py but I have no idea where to continue form there.
  10. Modding Q&A [For Quick Questions and Answers]

    Ugh, just get back to modding after weeks of toiling of real life stuff.

    Anyways, I want to ask a question regarding custom battle scenes in the singleplayer campaign. Now, I've did search around the board regarding adding custom battle scenes but I can't find any topics about that. I'd like to replace the 'randomness' of the battle scenes with either all custom made ones(100% custom), or a mix of both (50%custom, 50%random).
    So I'd like to ask if anyone can point me a direction towards inserting custom scenes into the world map?

    Now, I assume that the random terrain generated meets certain criteria such as 1)which terrain piece you are standing on, 2)how close are you near another terrain and 3)how high is said terrain, is that right?
  11. Modding Q&A [For Quick Questions and Answers]

    jacobhinds said:
    Adding new faction slots or slots in general is fine, you just need to make sure the numbers aren't being used by other "similar" slots (faction, party/center, troop etc), which is why they're always in order to help prevent accidental overlap.

    The troops assigned to those slots are only meaningful to the player when he recruits from villages. Other lords and garrisons use "party templates", and by putting noble troops in template C, they're excluded from garrisons and merchant caravans (which only use A and B).

    Forgot that castle guards get their troop IDs from the tier slots.  :oops: In that case, search the entire module system for slot_faction_tier_5_troop and make sure any guard scripts you come across read from tier 4 instead.

    That certainly would remove the hassle the extra slots for my 'nobles'. Thanks. The tier 4 troop is used in escape from towns scenario though, but thats negligible.

    Although, talking to town guards gives me that usual 'surrender of die' dialog, which is odd, because I did not change any fundamentals on the tier troop script except for a different troop in the  slot_faction_tier_#_troop,
  12. Modding Q&A [For Quick Questions and Answers]

    Short Q,

    Since I've added Towns and Castles to be recruitable, I've placed different 'types' of recruits, and used the faction cultures in script.py.
    Only problem is, since there are only 5 tiers of defined troops in the scripts, using that would mean that I'll be seeing noble 'recruits' guarding the town walls, which spoiled the immersion alittle for me.

    This is what I tried:

    from scripts.py

    #Cultures

        (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop,


    I've added this along:
        (faction_set_slot, "fac_culture_1", slot_faction_recruit_tier_1_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_recruit_tier_2_troop,
        (faction_set_slot, "fac_culture_1",  slot_faction_recruit_tier_3_troop,


    Now, once I build the module, got a flood of errors about this one, and knowing that life is not that easy, I've traced the problem about and eventually sniffed into the constants.py, which
    I'm assuming that to add this new "slot" in the script, I'll need to add the 'slot_faction_recruit_tier_1/2/3_troop' with a new numbers, 151-153.

    So..... started the game, tried to recruit 'nobles', the game menu dialog script seems to work alright, but I did not get any 'noble' recruits. I'd believe something's wrong in the scripts.py, but I've checked, I've changed to recruit  slot_faction_recruit_tier_3_troop, so nothing wrong should happen here.

    I suspect it's the module_constants.py, I take it that it's a bad idea to add new slots in the faction slots? Or for that matter, adding to any other slots?

    And no, no link to Ultimate introduction to Modding ......... I have enough of those.

  13. Modding Q&A [For Quick Questions and Answers]

    Ok, just jumping through the great wall of coding, and I've encountered something while implementing Caba's script for troop weapon selections

    Placed the scripts, constants and mission_templates on the module system, and the outcome is from the mission_templates about an indention error, particularly this:
    Code:
    order_weapon_type_triggers = [     
    	(0, 0, 1, [(key_clicked, key_for_onehand)], [(call_script, "script_order_weapon_type_switch", onehand)]),
    	(0, 0, 1, [(key_clicked, key_for_bothhands)], [(call_script, "script_order_weapon_type_switch", bothhands)]),	
    	(0, 0, 1, [(key_clicked, key_for_ranged)], [(call_script, "script_order_weapon_type_switch", ranged)]),
    	(0, 0, 1, [(key_clicked, key_for_shield)], [(call_script, "script_order_weapon_type_switch", shield)]),
    	]

    It seems the error is pointing the o on the order word, and I couldn't figure out what's going on, even when I've doubled checked my other codes. Then I searched for the indention error and realised that it has to be placed in the start of the line.


    Genius. I spent hours trying to figure out a simple mistake. Wonder why I didn't learn coding when I was 5.


    So just a question, in laymans terms, that is a new piece of code that I'm adding onto mission templates. and for every code in that file, I have to shove the code to the left most side in order for it to work?, and that other py files like scripts and game_menus all consists of one whole code?
  14. OSP Code Combat Script to guarantee all melee weapons (1hand, 2hand + polearms)

    Redleg said:
    Are you using PBOD in your mod?  There is some code in PBOD that has to do with how weapons are selected that may be interfering with your modified Strafer's script.  I had similar problems with the Somekidds force polearm script on the first page of this thread.  It seemed to work but would occasionally lead to fairly frequent game crash when going into battle, something that never happened before I installed the scripts.

    Crashing is never a problem for me though, not that I've ever encountered any.

    Never used PBOD, although I intend to add it into my mod, that sort of sucks though, that's a very essential mod for tactical battles.
  15. OSP Code Combat Script to guarantee all melee weapons (1hand, 2hand + polearms)

    Hmm, excuse the necro, but I'd thought I'd like to share what I'm doing using Strafers script, and perhaps anyone can help me.

    The OP has allowed me to have spearman with guaranteed spears while having one-handed weapons. However, this applies to all troops for some reason. I persumed that this code below would allow me to exclude certain troops to have guaranteed polearms/2h, but apprently it applied to just about everyone.

    (this_or_next|eq, ":troop", "trp_YOUR_TROOP"),
    (this_or_next|eq, ":troop", "trp_YOUR_TROOP2"),
    (this_or_next|eq, ":troop", "trp_YOUR_TROO3"),

    So I used Strafers script, which indicates that the first inventory item of the python troop file (item1, item2, item3), in which if a 2h/pole weapon is on the first item, the troop would have a guaranteed use of the 2h/pole weapon. I've directly used his script since it applies to all troops. I'm using Morgh's Editor to sort the troops out.

    So far, it works for 2h weapons, there is randomisation of 2h weapons if it's not placed on the first inventory item. The random distribution is just like native, which I believe it's 20-30% ish?

    But for polearms it's abit iffy. I placed spears at the last of the inventory list and they still show up on every troop, and what's funny that only about 10% of a chance troops would not get spears. Tried to place the spear inventory in the middle of two other 1h weapons, but didn't work.

    Any thoughts for this issue? I'm not code savvy myself so its rather difficult for me to figure this.

Back
Top Bottom