搜索结果: *

  • 用户:duck83
  • 按日期排序
  1. Need help of advanced coder for castle building sim SCENES ONLY MOD!

    Thank you for your reply MadVader.

    I'd gladly exercise on making that suggested code if if ever got the chance to start thinking the way on how to make it. You have written to assign a global variable. I have found info like a command that I can use called "assign" and also found that I can use to identify global variables by their pre-name "$" value, but I really don't know the basics. I mean I don't know if I can invent variable names myself or not?

    Like: (assign, "$tree_present", scene_prop_destroyed) in ti_on_scene_prop_destroyed and (assign, "$tree_present", scene_prop_...dunno what?) in ti_on_scene_prop)init?

    The example above shows how much faltering in writing the codes I am. Sadly. I don't even know the difference between instance_id and instance_no.

    I have started a thread two months back where xenoargh and cmpxchg8b wrote me a code which I was meant to put in my module system files.

    Here's the link if anyone wishes to read it again -> http://forums.taleworlds.com/index.php/topic,261002.0.html

    I faltered there too. I mean I was meant to put two parts of code into two different files and I did that, yet I had an info about a value not defined while processing the module files. Xenoargh did replied to that and still I couldn't help myself much. He also wrote about writing a checker and that sounded quite like a total cosmic journey to me. Perhaps the lack of it made the whole thing the code guys wrote didn't work.

    I hope it all doesn't sound like a complain? I know that exercising idea was meant to push me a bit and set on the right route on doing things myself. It's like I'd love to, but I don't know how. I'm good in putting new items into game and making them in wings3d. I decided to make some mushroom meshes. I know it sounds comically, but that is a sort of thing I feel well while doing.

    It seems this whole thread will get to nowhere probably. I'll try to make more scan on search module on the forum. Still I guess it's quite like fighting with the mills to me :wink:

    Thanks for your effort on trying to understand the idea of that mod. I will make such threads with a bit more precise info form time time over and over again and hope I'll find an ally :smile: For now I'll make those mushrooms and will do the scene. Perhaps I'll start making some art like xenoargh proposed. Time will tell.
  2. Need help of advanced coder for castle building sim SCENES ONLY MOD!

    Thank you guys for your interest for this thread. I know you two are experienced gamers and coders here and it's really great you decided to speak up a bit.

    I have played Persistent World and thought it was great. Still it lacked a bit of simulation-like elements. I mean there were many things done like in real world. Chopping trees, harvesting grain, getting gold and so forth, but even despite mod's awesomeness it felt a bit PC-game like. I know it might sound odd. Still I believe that MnB WB already offers that sort of depth that could be used for making it splendid. Way lot more, than a common PC game. I just think about making that mod that might go a bit beyond standard understanding of PC games. I just wish to make a really fun simulator, not quite a game where your goal is set for xp and gold. I wish it was a bit more about other feelings (apart xp and gold), like seeing that you create a land of medieval setting, live in it and get yourself educated a lot about medieval. I have graduated with the specialization on XI/XII century medieval daily life in Europe. I got past through about 40, thick with information books about that period and that didn't bore me. It just made me thrilled about all that thing even more. I know some might not share the same interest, but the goal of this mod is to make simulation. I wish I had the same good feeling while reading books about Python coding. I know the basics. I learned about them, still my mind isn't that logical to get past through imagining on how advanced codes work.

    On the other hand I have some sort of good recognition of what I need to achieve in borders WB's engine creates. I'll write it in list.

    1. The code for scene props disappear permanently from scene if destroyed (even after another next entering into the scene).

    2. The code for dialogue option, making the order to move to a pre-set location and start attacking any nearest item next to the pre-set location. That thing is the hardest thing I imagine that would need to be done in the whole coding process.

    It is needed for "bots" to go, if ordered, to the lumberjack camp, or farm or quarry, or ironsmithy, or any other economical basing location. There that "bot" would need to automatically start chopping trees, harvesting grain or do any other thing for a piece of time. Then it would start doing nothing (like starting the laying on the ground animation) for another piece of time. After that the loop would start again and he would get back to his working activity.

    3. The code for spawning enemy party in one of the entries and making it move towards one of three player's locations (could be randomized). After the spawn the location mask would be needed to got changed for battle one. After all enemy agents would got killed the mask would be needed to get restored to the "peaceful" one.

    4. The last crucial code for counting the resources gathered and adding them to the player's chest. That is if a tree would got chopped it would be transported to lumberjack camp by the serf (making the animation is my goal). In that moment that resource counter code would need to add one log to the player's chest. I mean it might not need to be done strictly dynamical. The log could be stored in some string or anything and got added after player re-enters the scene.

    That is it. Four codes that are crucial to this mod. I'll say one more thing about that re-entering the scene. At current I plan for automatic re-enter every 15 minutes of the game. Might be, it would got stretched to an hour if that was to become necessary. The automatic re-enter would be like the saving of the progress. So all chopped trees would be permanently removed. All other resources gathered would be removed. The counter for gathered resources would be actualized and proper amount would be added to chest. "Bots" would start again their previous tasks automatically. Saying it straight, I lied, that re-entering autosave is the final 5th crucial code that would need to organize the functions of the previous four.

    On top of that player would be able save his game normally via ESC menu, just to save the progress of the game and keep the resources attached to the player next time he loads his game (also via classic menu - just normal WB function).

    About building structures. There would a bunch of pre-set locations for building that player might erect during the game. That progress of buildings already added would be connected with the first code. It would be done like through dialogue menu with a chamberlain or someone like that and by choosing which building the player would want to build. Builder serfs would need to be ordered "manually" (via their dialogue menu) to go the site and start their building tasks. After some serf's working loops would got ended, building would got spawned from under the ground (I guess that mod that allows player to build there towns uses spawns like that. I forgot the name of that mod. Played it though. It was a great time.).

    I would wish to get two more codes but those are cosmetics. First is making the day night cycle actually work. It would be like the day scene was going to be attached to village mission template and night to the town mission template. That would allow me to change the skybox without changing the scene. It would work (I think, it's quite a guess) if the same scene was set for two world map locations. After the day is over (like after that mentioned 15 mins) the player would leave village location and the needed code here would automatically attach him to the town location with autoenter menu that would load night skybox in that same scene. The loop then would start in a sort of reverse mode and after the night time is over, player would be "transported to" day location, that is the one with village mission template. I don't know if that would work however that well I imagine. I think, that village and town mission templates are pretty much the same in terms of functions granted to them. Still I might be wrong. It might be there's no way it might work. The cause might be based on different "leaving" of the battle mode after enemy party got spawned. I mean I guess that village mission template can switch modes easily. I don't know if town's can do the same.

    This whole thing about night/day cycles might be really hard to achieve. Still I am aware everything I ask for is dead hard to achieve.

    Last code, not a crucial one would be meant to work like a dynamical entry point for every agent. So if the autosave would start and scene would got re-loaded all agents wouldn't move to the static, starting entry point. Instead of starting in start entry point agents would start in their previous location. That code most probably is near to impossible to achieve, or totally not possible because of engine's limitations. Still that is a cosmetic I really wish to have, yet the world wouldn't end without it.

    Thank any of you who got to that point for your attention. That mod's need list is over. That mod apart of that coding would need a lot of care in terms of making scene props, animations, items and a lot more things I'm really thrilled on thinking on doing.

    In the end I'd like to ask anyone who did made through that wall of text to try to judge if those codes are possible at all to make. I am aware that even if those codes are possible, I might never find someone willing to help on writing them. Yet as you two guys, xenoargh and MadVader suggested, I made my first step. I written about the concept from a technical point of view. It's like I have said at the beginning of this post - I really appreciate your effort on reading my previous posts and giving some advices.


    I have also written in the earlier post I intended on doing some cloth mesh. Here's a picture. It's basically only a texture changed a bit. The base for it is nobleman's outfit. I know that for all you guys craving for the battle glory such sort of items are totally worthless in current game. My idea of making things like that one for this mod would be based on showing some distinction of player's character. On the other hand items like that, if accumulated are going to be precious enough, that after selling them, player will be able to buy more proper items, like swords i.e.

    lordl.jpg


    The picture above is lord at the gate of his wooden keep.
  3. Need help of advanced coder for castle building sim SCENES ONLY MOD!

    Thank you for your comment xenoargh.

    Your advices are very good and set me on some graphics job again (I was making scene lately only).

    I decided to put here two images of objects I have already done for MnB and that mod. The first one is the swine / boar. Don't look too much at too bright fur it has, it's just the first texture I made for it. The second one is made in browns. I will put some images of the brownish swine / boar after I finally will rig it. I haven't done that yet properly. I have some problems with rigging, but I will make it through them for sure.

    dzik3.jpg



    The second image shows big birches (trees) that I have made also for use in this mod. Those birches use standard MnB trees meshes and have texture attached done by me.

    birchwood1.jpg


    So far that is it. I mean those are just two objects I have done for that mod. There are also other birches subtype objects, like those trunks you can see on the image. I have also made the upper, chopped-off parts of the trees, that are going to be used as wooden logs in mod. If you guys got any interested you can see also non-birch trunk on the image above, that is a part of pine tree. It surely got chopped too. The thing is I did trunks and pre-logs for all tree meshes that I'm going to use in mod. That is about 15 types of trees placed already on the scene and I will probably add a few more. That image above shows the forest I create on the scene. Currently the forest consists of trees only, but I intend on putting into it some old, semi-rotten logs, stones and bushes. That forest occupies about 5% of the total area on the scene currently and it is meant to hold about 80%. All those trees are placed manually and that takes a bit of time. Those trees are scene props and there is about 1125 of them now placed. I have made LODs for them so they aren't making way lot of lag in game, yet a bit for sure for older PCs.

    I will probably start doing a cloth with some golden belt that is going to be used as a decorative thing, you as a player will be able to wear. That might take me from few hours to a week if I get some problems with rigging and I bet I will. I'll put that new object's screens here too, so you guys might grab some impression of a bit lordly life comforts I'd wish to implement in mod too. In the breaks between making that cloth I'll try to write a bit more about some planned aspects of gaming in mod. Those are going to be like the balance of time to be spend between building and ruling - fighting - and decorating your indoor areas with some non-usable items like furnitures (but those are really going to look great!).

    See you later.
  4. Need help of advanced coder for castle building sim SCENES ONLY MOD!

    Hello to you all Incomers! At first I'll write a short preview, being targeted at old PC strategy games players. The mod I'm trying to create would be nearest to the impression some of you perhaps knows, based on old game Lords of the Realms II. It is not going to be that sort of strategy...
  5. code for scene prop disappear from scene permanently if destroyed

    Ok, so I got the sketch. It's just a really good start for sure. Will look into other mods perhaps for some examples of things being done that way. Dunno how am I supposed to write that checker, but perhaps that will come with time, or I will get some a bit more skilled than me coder to that project.

    Thanks again. You two guys, and especially you  xenoargh helped me a lot. I surely will write your nicks in my "thanks go to" list.
  6. code for scene prop disappear from scene permanently if destroyed

    But how is this new definition going to be connected with previous aspen_c definitions in module_scene_props?

    I can see I need to add that code written by you into mission_templates ... just once or for every unique mesh?

    Then I add this new aspen_c_destructible definition to aspen_c whole code but how is it going to work? I don't get it. Perhaps it's all too much to me.

    What about that tree_prop_states_begin that throws an error it's not defined? How should I define it? Just add it in the module_constants in the scene section? What number should it get if yes?
  7. code for scene prop disappear from scene permanently if destroyed

    So I don't write tree_prop_state_begin, but aspen_c_state_begin and define it exactly the way I written now in module_constants below the original values there? And of course I add aspen_c_state_ends also there? What numbers should I add after "="?

    And is aspen_c_state_begin and aspen_c_state_ends written correctly at all, or should it be aspen_c_prop_state_begin and _ends?

    EDIT:
    Just that one more clue on that. I change that tree_prop_state_begin to aspen_c_state_begin or aspen_c_prop_state_begin and define it in module_constants with what range? aspen_c would get a number like 5 and another tree mesh 6, and so on, right?
  8. code for scene prop disappear from scene permanently if destroyed

    Guys you're great!

    I'm reading those two parts of codes ... and don't truely understand the first one done by cmpxchg8b.

    But if I get you right xenoargh, I just leave that cmpxchg8b code as it is, put it in the proper mission_templates part regarding the scene mask (or flag? I still can't get myself to remember it correctly). Then I add to your code the part about spawning that replaceable mesh below your part of code and I'm set?!

    I'll try that now. You two guys already helped me a lot. Many thanks for that!

    EDIT:
    All right, I'm worthless. Just need to know that - that tree_prop_states _begin is meant to be changed in accordance to the names of my own meshes? I have an error while processing files that it's not defined and I'm that "smart" to check there is no constant like that, yet there is scene_prop_state_begin slot in the list. So I need to modify it like aspen_c_states_begin? ... and make same part of code in mission template for every other tree mesh I intend on implementing, right? Are there any other values I need to change? Would I need to add some lines to the module_constants with those names of my tree meshes, like this aspen_c_states_begin and ..state_ends, or are those two lines universal?
  9. code for scene prop disappear from scene permanently if destroyed

    It will take some time to me to understand that code of yours cmpxchg8b.

    I get that this code is meant to be placed in module_scene_props under ti_on_scene_prop_destroyed?

    In which module file should I "try" to add parts concerning the new loading of the scene?


    EDIT:
    Hey cmpxchg8b! What about you just write those last code lines and tell me where to place them and I'll make some super cool texture for you? :wink:
  10. code for scene prop disappear from scene permanently if destroyed

    I have only one big scene where the whole action is going to take place.

    As long as I get you right, you were writing about 100 different trees - you meant 100 different meshes, or scene props placed on the scene, using let's say the same mesh?

    I'm asking as I thought so far, that while using a limited number of different meshes I'm meant to stick to those limited number of unique code parts set for each mesh. That is while I use unique scene prop and make code for it I'm meant to place parts referring to the variables inside that code. So if I have 10 scene props using same mesh there would be one code for those 10 and other for those using different mesh. I though it would work like -> a tree got chopped, so I store a variable of it somehow and then spawn a trunk regarding to that specific variable. That wouldn't work, right? I mean I would need to write a unique code for every scene prop placed or just for meshes used?

    EDIT:
    I'm just asking as I'm trying to understand the options the engine grants me. Besides I'm terrified with the thought of making a code for one tree mesh work the way I want it, not to speak about writing the while randomization placement code. Geee. that thing just kills me whenever I try to think about it.
  11. code for scene prop disappear from scene permanently if destroyed

    I'm placing all my trees by myself. It takes zillions of hours, but the effect is exactly the way I wanted.

    I will try to use those variables then. I know that there are two fields for variables visible while editing scene. It's hard for me to start any code without any background on how to do that. I know it's way too much to ask, yet I'll try. Perhaps you could point me to somewhere where I can learn on how to use those variables, or perhaps you could even make some skeleton for the code with the use of those?  :lol:

    I'll search forum for some variables thread. Thanks for your current input, it's really quite a lot to me.

    EDIT:
    I forgot to ask. If I am decided to stay with my manual scene prop placing method would that mean I would need to enter an unique var number to every scene prop currently placed?
  12. code for scene prop disappear from scene permanently if destroyed

    Hello. I made some questions in Q&A thread, but thought it's too much chaos now in there and will start a new thread. In my mod I have trees that can be choppable. I want them to become trunks if destroyed. I can handle it pretty easy by moving the tree underground and spawning a trunk in it's...
  13. Modding Q&A [For Quick Questions and Answers]

    I get error while processing, that "slot_scene_prop_chopped" is not defined.

    Here is all the code for that scene prop:
    ###aspen_C

    ("tree_aspen_c",sokf_destructible,"chopable_aspen_c","bo_chopable_aspen_c",
      [
        (ti_on_init_scene_prop,
          [
            (store_trigger_param_1, ":instance_no"),
    ####code by Dusk Voyager
            (scene_prop_slot_eq, ":instance_no", slot_scene_prop_chopped, 1),
            (replace_prop_instance, ":instance_no", "spr_trunk_aspen_c"),
    ####ends here
            (scene_prop_set_hit_points, ":instance_no", 199),
            ]),

    (ti_on_scene_prop_destroy,
        [
          (this_or_next|multiplayer_is_server),#only serverside
          (neg|game_in_multiplayer_mode),

    ####another part of code by Dusk Voyager
            (store_trigger_param_1, ":instance_no"),
            (scene_prop_set_slot, ":instance_no", slot_scene_prop_chopped, 1),
    ####ends here

          (store_trigger_param_2, ":instance_id"),

          (prop_instance_get_position, pos1, ":instance_id"),
          (set_spawn_position, pos1),
          (spawn_scene_prop, "spr_preitem_aspen_c"),
          (spawn_scene_prop, "spr_trunk_aspen_c"),

          (position_set_z, pos1, -10000),
          (prop_instance_set_position, ":instance_id", pos1, 0),
            (play_sound, "snd_dummy_hit"),
            (particle_system_burst, "psys_dummy_smoke", pos1, 3),
            (particle_system_burst, "psys_dummy_straw", pos1, 10),
        ]),
        (ti_on_scene_prop_hit,
          [

            (play_sound, "snd_dummy_hit"),
            (particle_system_burst, "psys_dummy_straw", pos1, 10),
        ]),
      ]),

    I'm totally new to coding and dunno what should I do to solve that. Is that because of some messing with trigger params? Any help, please guys.
  14. Modding Q&A [For Quick Questions and Answers]

    Thanks for your reply Dion/Folcwar, but that's not actually what I'm looking for.

    I still need to get my destroyable scene props remain destroyed after entering the scene next time. I have tried to make a code, which I would like you guys help polishing it.

    ti_on_scene_prop_init
    (try_begin),
    (scene_prop_slot_eq, "$current_scene_prop", slot_scene_prop_chopped", 1),
    (destroy current scene prop),
    (spawn trunk)
    (try_end),

    ti_on_scene_prop_destroyed
    (try_begin),
    (scene_prop_set_slot, "$current_scene_prop", slot_scene_prop_chopped", 1),
    (try_end),

    So after a while of searching on the forum I came up with the thing above. The problem is I'm totally new to coding in python and I don't know if "$current_scene_prop" is a proper instance_id and if the second part of the code isn't too short? I mean that part with setting the slot in "ti_on_scene_prop_destroyed". Shouldn't there be something else added, like assign slot to that scene_prop id?

    I want to achieve the effect of having scene props swap for destroyed scene props every time I re-enter the scene, after their destruction. Please guys help, any clue would be priceless.
  15. Modding Q&A [For Quick Questions and Answers]

    Hello.

    I would like to know if it is possible to have destructible scene props (like training dummies) that after being destroyed would show that way, next time character will enter the scene? (so that those dummies wouldn't regenerate)
  16. Changing scene size.

    I'm making a scene only mod myself. I'm rather poor at coding but I have made my first steps. I really like the idea of sand-box mod or just a mod based on scenes only. It brings a lot more thrill to me, than the standard game-play MnB offers now.

    My mod is going to be about some minor clashes between rivalry medieval regions and their lords set on in Europe in XII century. It will basically be made as a rather simple world consisting of one big, yet detailed scene, where player is going to be able to issue orders to his peasants based on working activities like chopping trees or harvesting wheat.

    That mine idea is mainly about making some strategy game of current MnB with the use of FPP or TPP view. If you want to read more I'm pasting link to the thread of this mod -> http://forums.taleworlds.com/index.php?topic=258131.new#new

    It is very innovative in MnB moders community to think about making such a mod. It would really require lots of job concerning good codes and yet innovative. I wish you luck on your project (and finding a good coder) as I hope to play something like that done really good, one day.
  17. Modding Q&A [For Quick Questions and Answers]

    Hello.

    I'm still trying to make a consequence block (yet another) starting after the condition is met after some delay, working in the scene. I have tried ti_before_mission start and got some results like condition working just after I entered the scene. I think it's the nature of that command, that it ignores any delay inputs.

    I'm asking if anyone of you know which ti_ command used in mission_templates, or in any other module file would do the trick? It doesn't have to be a ti_ command as long as it will start the counter after I enter the scene.

    Any help would be most appreciated. The easier to do sollution, the better for me, as I'm just making my first steps in writing codes.

    EDIT:
    I'm trying to experiment with ti_on_agent_spawn command, but it's something I miss in logical thinking in writing the condition block as i get info that variable is not used:

    I have something like this:
    (ti_on_agent_spawn, 0, 0, [(get_player_agent_no, ":player_agent")], [(jump_to_menu, "mnu_village")]),

    and am trying to set the condtion block for getting a true value after the player is spawned on the scene, so the consequence block with it's delay time would get in to the action. It's missing some code parts. I know it looks like I was trying to ask for writing the code for me, but it's a rather one time sollution. After any of you would bring some more light to it, I surely will catch up how it is meant to be done.

    EDIT2:
    OK, I know how to solve my question myself. It was so easy I'm feeling stupid I did asked for it at all. Sorry for that.
  18. Modding Q&A [For Quick Questions and Answers]

    Won't help you then, I have quite a big screen, and it worked for me.

    ...

    I still have a question about that code of mine, from the previous page.

    Now it looks like this:
    #### Code for starting the counter for enviromental changes
          (ti_before_mission_start, 90, 90, [],

      [(scene_set_day_time, 6)]),

    I don't know what I do wrong, but I get no delay before "scene_set_day_time" starts to work. Is it because this line won't ever get delayed, or because my condition block with a counter set for 90 is empty and thus is failling it work and thus my consequence block set for 90 delay either doesn't start at all?

    I get that scene time set at hour 6 just after I enter the scene. Does anyone of you know how it works? Can I delay that time setting or is it just permanent value adjusted after the mission starts?
  19. Modding Q&A [For Quick Questions and Answers]

    Thanks MadVader - just figured it out that it's something with that z interval (second 0 in my code) that breaks things.

    About that too tiny window for making weather change - try setting max. screen resolution for windows and then run MnB again in window mode. It worked for me perfectly.
  20. Modding Q&A [For Quick Questions and Answers]

    Hello.

    I have a pretty easy (I believe) to solve question.

    I'm trying to learn changing module_mission_templates with an easy trigger.

    I want to achieve effect of getting a tree scene prop pop up in the player location after 10 secs the mission screen is launched. I'm making my first steps with it so please try not to throw all bad emotions at me :wink:

    The script is placed in the village center part of module_mision_templates, as is my scene mask/flag set.

    I get lots of errors while processing module system at the beginning and at the end. Those are like huge blocks of error msgs so I believe I do something logically wrong with me script.

    I ask you to put some light on the script writing, for such a noob as I am. Additionally if in any case my script was logically correct I want to add, that the village center section already has one "ti_before_mission_start" part of code. And want to ask if it would be valid to have two of those?

    The "super" code itself:
    #### Code for starting the counter
          (ti_before_mission_start, 10, 0, 0, [],

    [
            (get_player_agent_no, ":player_agent"),
            (agent_get_position, 1, ":player_agent"),
          (set_spawn_position, pos1),
          (spawn_scene_prop, "spr_preitem_tree_16_b"),
    ]

    ),

    I get no errors like syntax, but those two blocks of errors. I will throw a picture of module system processing with those errors if necessary.
后退
顶部 底部