搜索结果: *

  1. Derek_Custer

    Larger & flat battlefields

    Rylo 说:
    Oh and I use diplomacy 4.3, not 4.2
    The source for 4.3 is here, but I don't know how to download it as a whole:
    https://www.assembla.com/code/diplomacy/subversion/nodes/trunk?rev=89
    You will need Subversion, which is known as a CVS (http://en.wikipedia.org/wiki/Concurrent_Versions_System).

    Get Subversion from here: http://subversion.apache.org/packages.html

    To get the latest Diplomacy source from https://www.assembla.com/code/diplomacy/subversion/nodes/trunk?rev=89 you will need to do so via a process known as "Checking out".  There should be instructions somewhere that explain how to go about that.  As I haven't used a CVS in almost 10 years I doubt I'm the one to give you instructions on how to go about using it. :smile:

    Edit:  Once you have a complete copy of Diplomacy via CVS your first steps will be (assuming you already have Python correctly installed) to:
    a) Create a work copy of your currently installed Diplomacy mod.  Where Warband is depends entirely on your install.  I used to use the Steam version, now I use the version you download from Taleworlds own website.  Once you find it (mine is "C:/Program Files (x86)/Mount&Blade Warband/") go into the Modules directory and create a copy of the Diplomacy mod.  Rename the copy's directory to "Work".  So now it it was me I'd now have a copy of Diplomacy mod called Work eg. "C:/Program Files (x86)/Mount&Blade Warband/Modules/Work/"

    b) In the module source directory (once you've downloaded it all via Subversion) open up module_info.py in Notepad++ or your favorite text editor and change the export_dir line to point to your work directory.  For example if I was doing it for mine I'd have the following line (and make sure you use forward slash and not back slash):
    插入代码块:
    export_dir = "C:/Program Files (x86)/Mount&Blade Warband/Modules/Work/"

    c) Once that is done, to do a test compile simply double-click on "build_module.bat".  If everything it set up correctly it will compile cleanly without errors.
  2. Derek_Custer

    Larger & flat battlefields

    Rylo 说:
    I have the correct version of python and I have worked with python before sometime in my life (Not a pro, but I know how the basic stuff works)

    I have the polished landscapes mod and I have also added some extra horses, but I guess that shouldn't be a problem?

    I haven't done any Warband modding before, just edited little things in the module.ini and some txt files. So I don't know what I should do with all those .py files
    Well that's ok because technically the module system isn't written in Python. :smile:  Python is used to turn the functions of the proprietary macro-like language defined in header_operations.py into a sort of byte code that you find in the text files in a compiled module.  When you get your head around how it works it's fairly easy.  The difficult/annoying bits are working out what exactly the functions in header_operations.py do (although most of it is documented on these forums, there's even an edited version of that file with an explanation of each one where known) and understanding the limitations of the engine ie. what is hard coded and what can't be gotten around no matter how clever you are with their module system (which is when you generally turn to WSE as that bypasses a lot of the limitations via code injection).  The hardest part though is probably getting your head around how the whole game works.  To be honest, the module source is a mess.  That's only going to be a problem if you decide you want to take your modding further than what you've asked about so far though.  If you decide to go further you are in for a lot of reading (forums, official source as well as OSP source and other mod source).  It's worth it though.

    Nope, shouldn't be.  You will need to add entries for your extra horses though into the source (been a while since I added horses, think it's module_items.py) -- not hard to do.  Graphics wont be touched.

    I could nudge you in the right direction if you want a hand on starting out, but I'd rather you worked out how to actually do what you want -- having said that I'll at least show you where to look.  If you haven't I suggest you get Notepad++ and learn to use and love its "Search: Find in files" feature.  Makes life much easier.  Also add .py to its file association (in Preferences).
  3. Derek_Custer

    Larger & flat battlefields

    Ah ok I only just found it myself and was going to post a link to the latest Diplomacy source: http://www.mbrepository.com/file.php?id=1975

    You will need the entire source and there shouldn't be any issues setting its output directory to the one you have.  That is assuming you are just running Diplomacy with Polished Landscapes (ie. (http://forums.taleworlds.com/index.php?topic=129716.0)) and not the version of Diplomacy with Caba'drins pre-battle order extras (which also uses WSE).

    My point being that if it is just Diplomacy with Polished Landscapes, when you compile the mod it shouldn't cause any issues with the Polished Landscapes side of things.  Well, as long as you don't compile anything in the Data folder of the mod source (flora_kinds.py etc.).  Still, I'd make a back-up copy of the mod directory before you do any compiling -- just in case.

    Question though, have you done any modding with Warband before?  Meaning you know which version of Python to get, how to set it up, how to direct the source to compile to the right output directory, what code you will need to change to make this work, etc.?
  4. Derek_Custer

    Larger & flat battlefields

    If you really do just want what you said, just change the flags to 1280 (sf_generate|sf_auto_entry_points).  That should do the trick.  eg.

    插入代码块:
    scn_random_scene_steppe random_scene_steppe 1280 none none 0.000000 0.000000 240.000000 240.000000 -0.500000 0x0000000229602800000691a400003efe00004b34000059be

    As far as I can tell sf_generate means "Use the given code to generate the scene".  sf_randomize means "Randomize bits of the given scene".  sf_auto_entry_points I think is needed for any automatically (not edited using the built-in scene editor in Warband) generated scene in order that you have useful entry points.  Where sf_randomize is the part giving you issues.  Maybe.

    Edit:  Sorry, talk about totally untogether.  That's the source for a different mod.  I can't find the source for just Diplomacy.  Sure it wasn't included in the mod though?
  5. Derek_Custer

    Larger & flat battlefields

    You could disable it but it does mean that you will only have 1 map per terrain type.  ie. 1 for snow, 1 for desert etc.  There will be no variation at all.  Which is why Xenoargh altered the way Native chooses its random scene codes.
  6. Derek_Custer

    Larger & flat battlefields

    Well you might want to download the module source and check out module_scenes.py and header_scenes.py as they give a much better picture as to what is going on than the scenes.txt file does.

    From the top of module_scenes.py:

    插入代码块:
      ("random_scene",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x300028000003e8fa0000034e00004b34000059be",
        [],[]),
      ("conversation_scene",0,"encounter_spot", "bo_encounter_spot", (-40,-40),(40,40),-100,"0",
        [],[]),
      ("water",0,"none", "none", (-1000,-1000),(1000,1000),-0.5,"0",
        [],[]),
      ("random_scene_steppe",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000032860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_steppe"),
      ("random_scene_plain",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000033860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_plain"),
      ("random_scene_snow",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000034860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_snow"),
      ("random_scene_desert",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x000000035860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_desert_b"),
      ("random_scene_steppe_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000003a860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_plain"),
      ("random_scene_plain_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000003b860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_plain"),
      ("random_scene_snow_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000003c860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_snow"),
      ("random_scene_desert_forest",sf_generate|sf_randomize|sf_auto_entry_points,"none", "none", (0,0),(240,240),-0.5,"0x00000003d860c102400fffff000041ef00005ae800003c55",
        [],[], "outer_terrain_desert"),

    Flags from header_scenes.py:
    插入代码块:
    #flags
    sf_indoors           = 0x00000001   #The scene shouldn't have a skybox and lighting by sun.
    sf_force_skybox      = 0x00000002   #Force adding a skybox even if indoors flag is set.
    sf_generate          = 0x00000100   #Generate terrain by terran-generator
    sf_randomize         = 0x00000200   #Randomize terrain generator key
    sf_auto_entry_points = 0x00000400   #Automatically create entry points
    sf_no_horses         = 0x00000800   #Horses are not avaible
    sf_muddy_water       = 0x00001000   #Changes the shader of the river mesh

    If you are talking maps out in the countryside where battles take place, then it's obvious from reading the bit I've taken from module_scenes.py that any code you add to that part is a template rather than what you can expect as the final outcome thanks to the sf_randomize (and probably the sf_generate -- not entirely sure as to the difference).  Most of the other maps seem to be generating exactly according to the given code as they don't tend to have either of those two flags.

    The Blood and Steel mod seems to get around this issue by having a table of set maps (not generated randomly) that are chosen from randomly every time a battle happens in areas where you'd normally get completely random battle maps.  I haven't dug around in the source to see if you can cause this to happen by just adding extra entries to module_scenes.py or whether Xenoargh added a function to allows this to work, but it is obviously possible to change if you don't like the way Native generates its battle scenes.

    Edit:  Ah ok I get it.  Xenoargh modified script_setup_random_scene in module_scripts.py to choose randomly from a table of pre-generated map codes in module_scenes.py.  Nice.  I wont post his code here as I don't have permission but it's pretty straight forward.  If you have any experience with modding you should be able to come up with your own easy enough.
  7. Derek_Custer

    New mode: MY army vs YOUR army - Where to begin this ultimate quest?

    Yes, sorry about that.  I only really glanced through it when I originally found it but now I've had a closer look I have to agree that it's not terribly useful.  At least not on the surface.  From what I can see all it does is store strings in registers.  I don't see any actual file access anywhere and yet if you read further down someone is asking if it writes to text files and the answer from the OP is yes, so I'm now somewhat confused.  And no it doesn't appear to use WSE.

    The OP does mention their mod and here's a link to it, but I can't see anything useful there either.

    http://forums.taleworlds.com/index.php?topic=111808.0

    Really need input from someone like Somebody or cmpxchg8b.  I've never looked into that side of the engine.
  8. Derek_Custer

    New mode: MY army vs YOUR army - Where to begin this ultimate quest?

    I hate to burst your bubble but Warband isn't coded in Python and the engine doesn't actually run any Python at all.  Basically the Python is used as a sort of macro (not the proper term, I'm having a vague morning) language compiler which takes the human readable language used by the mod system (see header_operations.py) in your module and header files, and then "compiles" it all by outputting a series of text files containing a bytecode form of what the original module files contain (although some files it outputs are more like config files than bytecode).  That's what makes things so difficult at times as a modder.  You can't really do more than what "header_operations.py" says you can do, and while there is a certain amount of freedom in a number of ways, there are also quite a lot of limitations -- some of which are pretty much impossible to bypass (depending on how far you are willing to go).  So unfortunately you can't just add functions to read/write a file.  They have to be built in by the developers.  At this time, unless there's something I missed yesterday, you can't read/write files at all.

    Having said that, all might not be lost.  There is this:

    Warband Script Enhancer (http://forums.taleworlds.com/index.php/topic,151194.msg3634288.html#msg3634288).

    Edit:  Thought I should explain it a little better than I did originally.

    Edit: After posting the above I'm starting to think I'm clueless.  Or more than usual.  Turns out I may be wrong.  I just found this thread while looking for something else.  You might want to take a look-see.  The way I see it is you may have to set things up so before a player can do multi-player army vs army, they have to have loaded their single player game and exported things via a menu beforehand.  If that makes sense.  Anyway I haven't read the whole thread, but this might be of use to you:

    http://forums.taleworlds.com/index.php/topic,61239.0.html
  9. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Somebody 说:
    Derek_Custer 说:
    Is the flag used on a battle field to issue location-based orders to troops (hold down F1) still hard coded?  ie. can't change mesh or color?

    I had a long hard look through BRF's this afternoon so I'm guessing the answer is "nope, still can't change it".
    It's mapped to a part some random banner that's yellow in Native - also try looking at this, although it's slightly outdated.
    Hi Somebody.  Yeah I'd figured that out while looking at it.  I'd rather just remap the object to use a different texture I think, just to make it easier to change.

    Thanks for that link though.  Now that I hadn't seen before.  Might give the alternate version by Highlander a whirl and see how it fares.
  10. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Derek_Custer 说:
    Is the flag used on a battle field to issue location-based orders to troops (hold down F1) still hard coded?  ie. can't change mesh or color?

    I had a long hard look through BRF's this afternoon so I'm guessing the answer is "nope, still can't change it".
    I could have edited my original question but suspect most people wont look at that again and I just wanted people to know the answer, just in case there's someone else who was wondering.

    The answer is "It is hard coded, however you _CAN_ change how the flag appears if you edit the right object."  It seems the engine is hard coded to use the mesh "tutorial_flag_yellow" which is found in "Mount&Blade Warband/CommonRes/object_meshes.brf" as "tutorial_flag_yellow.5" (pole) and "tutorial_flag_yellow.44" (flag).  I'm not sure if it has always been that way, but it seems to work that way now (first suspected while playing Napoleon Wars, dug around a bit and found this which I then looked up and tested under Warband Native).  All my experiments in changing this via code have failed so far so I suspect the engine is hard coded to reference that particular mesh.  At least it seems that way to me.

    So remap that object to refer to a different texture or replace it completely with your own object (it may have to be a multi-mesh) and hey presto, you have a new flag that appears when you hold down "F1" during a battle to give orders to your troops.  I needed this because after the various graphical packs I added to my mod, I could barely see the flag when giving orders in the distance.  Tempted to replace it with a big glowing arrow.
  11. Derek_Custer

    New mode: MY army vs YOUR army - Where to begin this ultimate quest?

    simop 说:
    That would require M&B engine to provide:
    • Text file input and output (in SP and MP)
    • The ability to examine all stats of party members and units (in SP)
    • Ability to spawn whatever units and party members I want and set their stats (in MP)
    Actually the only stats you'd need would be the players and their companions.  Troops are generated per battle from a troop list. ie. You have 4 housecarls?  Well 4 housecarls are generated each time you enter a battle scene.  They will never look exactly the same each battle unless they only have one face and one lot of gear defined in their entry in "module_troops.py".  Since most have a face range and gear range, you will get troops that look different every time.  However their stats are _always_ the same as they are defined by their entry in the troops file.

    Therefore player stats and equipment, companion stats and equipment, and troop numbers and types are the only things you'd need.  Troops could then, in theory, just be generated from their entries when needed.  As for commanding troops, that should be possible even in a multi-player game.  IIRC the reason why you can't command NPC's in a Native mutliplayer battle is because they haven't been assigned to anyone.  So basically no-one is their commander.  See Captain battles in Napoleonic Wars for reference.  So all of that should be, in theory, possible.  However your major hurdle and probably the one that shoots this whole idea in the foot is, as Xenoargh's already pointed out, the issue of getting single player information into the multiplayer game.  There is a screen in single player (hidden away) that allows you to export parts of your character and import them, but it doesn't include a lot of what you are talking about and I have _no_ idea if it is even accessible in the mod system (suspect not).  However maybe this is possible with WSE?  Again, no idea as I don't use it.
  12. Derek_Custer

    OSP 2D Art [M&B] Scarabae Texture Pack v.2.9 (Updated 04.08.09)

    This isn't a mod.  It's a resource for people who make mods.  If you have a mod installed that recommends you install this pack, please ask the people responsible for the mod as to how and where to put the files.  You can't install this pack as it is and expect it to work, it was never meant to be used in that way.

    Google translate is pretty bad at the best of times, I hope the above translates properly. :smile:
  13. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Bluehawk 说:
    Docm30 说:
    Anyone have any ideas how I can make it so you get to keep specific items when you pick them up in battle? basically I want it so when you pick up one of my flag weapons it gets added to your inventory.

    I know for a fact 1257 AD has that feature. Anything you pick up off the battlefield goes into your inventory at the end of a battle. You could look through their open source code or ask one of the active dev members about it.
    I suspect what they did was add it to the player's inventory via troop commands at the end of the battle.  IIRC troop commands access the more permanent side of things while agent commands are just for the scene you are in.

    Edit:  Just spotted this in "header_operations.py" while looking for something else, wonder if that would do the trick?

    player_save_picked_up_items_for_next_spawn  = 459 # (player_save_picked_up_items_for_next_spawn, <player_id>),


    LOL Never mind, just realised it was relating to multi-player.  Whoops.  I'm pretty sure I know how I'd go about it.  I'd write some code but a) there's 100 people on here better at it and b) I'm somewhat busy confusing the heck out of myself with what I'm trying to do on my own mod. :smile:
  14. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Is the flag used on a battle field to issue location-based orders to troops (hold down F1) still hard coded?  ie. can't change mesh or color?

    I had a long hard look through BRF's this afternoon so I'm guessing the answer is "nope, still can't change it".
  15. Derek_Custer

    Official 3D art thread - Warband

    SacredStoneHead 说:
    Knowing how the UV map is set can be very good also.

    Do the following steps:

    1-If you still don't have it, download Blender for free;
    2-Export the female head contained in the meshes_face_gen.brf (found in CommonRes folder in your Warband directory) as .obj with OpenBRF, then import it to Blender;
    3-Select the imported mesh, hit tab to go to Edit Mode and A to select all the mesh;
    4-In the "UV/Image Editor" window, hit "UVs" in the menu, then select "Export UV layout";
    5-Copy the image you want to edit to a layer in the UV layout file;
    6-Put the UV layer on top of the image, set it to low opacity, then you'll know if what you're doing is fitting into the mesh.
    Thanks!  I appreciate the suggestion very much.  Will record it and use it later.  Reevaluating priorities at the moment, think I'll get back to this later.  Got a lot of code I need to write first before I get too carried away with graphics.  Vastly underestimated how difficult this would be for me to do.  Live and learn. :smile:
  16. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Dawiduh 说:
    Hey,

    I replaced faction 1 (Sawdia) with my own faction, deleted the other factions and added my own, as well as an overall world map redo complete with cities, villages and forts. New units, starting points, everything.

    I left Swadia on the map to the very end in order not to get errors and stuff and then i just placed my own units instead of the Swadians, etc. Compiles perfectly, runs perfectly BUT:

    1. all the walkers and guards dissapeared from the towns and forts scenes though the guards appear correctly in the castle room scene. previously to the Swadian overwrite everything was ok.

    2. while starting a new game te new character jumps to level 25.

    3. i get an error that there are not enough banners for the lords though i did not remove any banner.

    The code looks right so I cannot pinpoint my problem :neutral: Any thoughts?
    Not specific only general ones I'm afraid.  You've made quite a few changes by the sounds of it so it's a bit hard to talk specific (although Somebody, CMP, Caba'drin etc. may be able to give you specifics).  All I know is the one time I tried ripping out all the factions I had fun and games to get it all working again and that it was much harder (there was a lot of non-obvious changes required) than the basic guide I read suggested.  There was a lot of non-obvious stuff I had to change too.

    I sincerely suggest (if you haven't already) getting a tool that allows you to search for words in a directory full of files and searching for "swadia" and "faction" and checking every instance that comes up to make sure there isn't something you've missed.  The errors you mentioned sound very much like memory being overwritten to me.  Basically the sort of thing that you get in this situation (not that it's quite this straight forward, this is for illustration purposes only):

    Say the Native module has code where it creates these variables that sit in memory:
    Faction1
    Faction2
    Faction3

    Then it has a function with a loop that writes to Faction1, Faction2, Faction3 using FactionCount constant which tells it there are 3 factions to run through.

    Someone edits the code removing all but the Faction1 variable but doesn't update the FactionCount constant to tell the code that there is now only 1 faction.  So when it is compiled and run the function with a loop goes to write to all three variables but only Faction1 exists so it ends up overwriting "random" bit of memory resulting in weird values and odd behavior.

    This is just an example, but I do strongly suspect that somewhere in the code there is something like this going on.  At least with regards to the sudden jump to level 25.  The banner issue may be due to code that assigns the banners needing to be changed, although that could be due to something similar too ie. a constant that needs updating to indicate there are fewer factions than there was before.
  17. Derek_Custer

    Official 3D art thread - Warband

    Captain Lust 说:
    Should probably have used the "liquify" tool.
    Is that the tool that turns my computer into a pool of molten slag? :smile:

    Seriously though, thanks for pointing that one out.  Didn't even know PSE had it.  I'll have another go at it tomorrow.  At this point in time suspect I might be more successful with PSE than Paint.net although I quite like Paint.nets simplicity.  That and it handle DDS files natively.
  18. Derek_Custer

    Official 3D art thread - Warband

    I need some advice.  I've been trying to modify the textures from the "Female Face Model And Textures Replacer" pack by Broken_One to work with the altered face mesh from that pack which was changed by Y_Sephiroth (one of the changes was remapping the mesh so that it uses the normal Warband face texture layout) and getting nowhere fast.

    I need to turn this:
    womanface_a.2.jpg

    Into this:
    womanface_a.jpg

    Thus far all I've managed to do (semi successfully) is to redo the eyes.  However even cutting the image up into layers and stretching the bits I still can't get a satisfactory result.  This might seem insane but I liked the face textures from that pack although I prefer the alterations Y_Sephiroth made to make the altered mesh work with normal game textures, and thus far I haven't really found any other female face textures I like.  Mind you there don't seem to be many packs around.  I'd make my own but I'm a programmer more than an artist.  Simple 3D (I made a bag once, that took me a week), texturing and graphics are my limit.  BTW I'm using Paint.net to try and do this.  I'm guessing I really should be using something like the full blown version of Photoshop...

    PS Not asking someone to do it for me, more after suggestions on what I could do to do it myself.  Preferably with software that doesn't cost money I don't have.  Thanks!

    Edit:  Oh...  I think I may have worked out how to go about this.  Just required a different approach.  I wasn't thinking laterally enough.

    Edit:  Nope, that didn't work either.  What I really need is a way to break it all up into vectors which I can push and pull around to warp it in just the right areas.  A bit like an OpenGL programming example a friend of mine wrote once.

    Edit:  Just remembered I've got a copy of Adobe Photoshop Elements and Corel Painter Essentials that came with my Wacom tablet (probably not much good but hey) so I'm going to reinstall them and have a play.

    Edit: After an hour or so in Photoshop Elements I now have a rather badly done "painting" of a face as opposed to what I was aiming for.  Hilarious.  Some of us just aren't meant to be artists.  :mrgreen:

    womanface_a.PSE.jpg
  19. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Somebody 说:
    Tried attacks_staff_thrust_overhead?
    Unreal, thanks!  That worked.  Hadn't noticed that commented out section in the animation file before.

    Mr. Stabby my test spear thanks you too. :smile:
  20. Derek_Custer

    Modding Q&A [For Quick Questions and Answers]

    Is there an two handed spear overhead thrust animation anywhere that is free to use?  I've googled it, looked on the Nexus and the Repository but can't find anything suitable.  There is a one handed animation, but not two handed in the various OSP's I've looked through.  The one I'm currently using as a placeholder has been "borrowed" from NW and obviously not something I can release with my mod (if I ever get around to to releasing it).  Where's Papa when we need him? :grin:

    Edit:  Hmm I have an idea on what I could do (I mean other than spend the next 6 months learning how to animate in 3D just to do this).

    Edit:  Nope, that idea didn't work too well.
后退
顶部 底部