Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
Tried searching from old posts put couldnt find an answer to a question i have, can creatures that are ranked as ANIMAL be ridden like horses? I added one into my inventory but it says requires:2
So yeah, i know i need 2 something, but wont exactly know, what i need. So i dont know if it is even possible.

#Edit
Ah, sorry, i checked it again and in items file its difficulty is set to 2, i assume that by removing it i can ride it, sorry for a needless post.

#Edit2
Nope, it cannot be set to the place in inventory where horse would go.
 
kalarhan 说:
PPQ_Purple 说:
like nobody has any idea how recent events work.

just because there are not 101 tutorials about it, it doesn't mean people doesn't know how it works  :razz:

like I mentioned several mods have attempted to introduce changes or rework the system. VC (DLC) has some interesting changes.

you will find out that most features in the game are not part of a guide/tutorial in the Forge
1. I am not interested in mods that change how it works. I like the system how it is.

2. I looked in the other forum areas, in particular the discussion areas. And everyone seems to agree it's basically a strange modifier that comes out of nowhere and they can't pin it down. And this matches my experience with it. Nobody seems to have a way of controlling it and predicting it.
 
PPQ_Purple 说:
And this matches my experience with it. Nobody seems to have a way of controlling it and predicting it.

I mentioned other mods and VC as a example of people that were able to manipulate the system. Its all on the modsys, not hardcoded. The code is quite simple, the feature itself (the design and how it connects to a couple dozen other major system is not).

Its OK if you don't want to invest the time to understand it. There a few thousands features in the Native game alone, so you need to pick your battles  :grin:. As you gain experience you can tackle more and more of them.



MongolFromForest 说:
Tried searching from old posts put couldnt find an answer to a question i have, can creatures that are ranked as ANIMAL be ridden like horses?

sure, you just need to use the same flags as a horse. The game doesn't know if its a horse or a unicorn. You tell it by using certain flags that will tell the game to use the correct animations/skeleton, define how much riding skill you need, and so on

插入代码块:
["animal_pig","Pig", [("animal_pig",0),("animal_pig_2",imodbit_cracked)],		itp_disable_agent_sounds, 0, 10,abundance(10)|hit_points(25)|body_armor(0)|difficulty(0)|horse_speed(5)|horse_maneuver(5)|horse_charge(0)|horse_scale(60),imodbits_horse_basic],
插入代码块:
 ["common_horse","Horse", [("Horse_01",0),("Horse_01",imodbits_horse_good)], itp_merchandise|itp_type_horse, 0,
  6300,abundance(10)|body_armor(16)|hit_points(100)|difficulty(2)|horse_speed(50)|horse_maneuver(40)|horse_charge(18)|horse_scale(92),imodbits_horse_good],
notice the flag "itp_type_horse" used on the common_horse. The pig doesn't have it.

you will have issues with the animation depending on your animal. And check the scale used as well.

 
kalarhan 说:
PPQ_Purple 说:
And this matches my experience with it. Nobody seems to have a way of controlling it and predicting it.

I mentioned other mods and VC as a example of people that were able to manipulate the system. Its all on the modsys, not hardcoded. The code is quite simple, the feature itself (the design and how it connects to a couple dozen other major system is not).

Its OK if you don't want to invest the time to understand it. There a few thousands features in the Native game alone, so you need to pick your battles  :grin:. As you gain experience you can tackle more and more of them.
It is clear you do not understand what I am saying.

I am not saying that as a programmer I could not crack apart the code and figure out how it works. Of course I could. We have the code. T'woud take me a day or two but I could come out with a diagram of what causes it, what effects it and what it effects. But that's not the point.


What I am saying is that from the perspective of the player it is an opaque mechanic. That is to say it is a mechanic that a player playing the game and only using the game and the data it provides him as is without cheating by peeking behind the curtain can neither understand, predict nor manipulate. That is why when I searched the discussion forums and NOT the modding forums nobody had a clear answer. Because they don't know.

And it is a mechanic explicitly designed to be opaque.

We know this because all the other various parts of the morale system like leadership, party size, food bonuses etc. are heavily documented in the game it self through various pieces of the interface that go to great lengths to explain them so that the player can manipulate it.


And from my point of view if the game designers have chosen to explicitly keep a single part of the morale mechanic opaque when they made sure to reveal others that tells me that its meant to be a balancing feature that is supposed to work behind the lines and that the player is not supposed to understand.
And I don't want to reverse that.
 
Where could i ask a modeler to make some models?Or at least is there any good texturing tutorial for blender...Because my modeling skills are pretty good but i dont have idea about textures (i know how to make uvmap and things but cant draw anything)
 
DarkNord 说:
Where could i ask a modeler to make some models?Or at least is there any good texturing tutorial for blender...Because my modeling skills are pretty good but i dont have idea about textures (i know how to make uvmap and things but cant draw anything)

If you have a thread for your mod then leave a post detailing what you want made. And this is a tutorial I found useful for learning texturing. Should be more in the tutorials section.
 
kalarhan 说:
HarryPham123 说:
how to fix this error http://imgur.com/a/U2p8m

seems you broke some engine rule. It says "num_edges" when processing the body code. What did you change last?

instead of getting surprised by your own bugs you need to start to compile and run the game more often. You are the one adding stuff, and also breaking it, so you should have a pretty good idea of what is wrong. Then if you still need help you can bring your last changes here (code, describe the BRF/object/mesh, OSP you are using, etc)



HarryPham123 说:
addition does Wreck gives warnings?

not all bugs are related to the modsys. You can cause errors on your module.ini, on your objects (meshes, etc). So on those cases the compiler (Native or WRECK) won't help.

not saying this case is not code (as Harry doesn't give us information).

you can also have bugs on your code that the compiler doesn't check. Like trying to change stat of a troop beyond the engine limits (with causes asserts error/warning), and so on. Compiler checks the usual cases (syntax, operations and some logic errors like not closing scope)



PPQ_Purple 说:
For all the other variables it's easy because they are either easily calculable (like leadership) or easily obtainable by experiment (like food). But recent events are just a complete mystery to me. It's something that always just looked like a random thing that appears for no good reason for me and I newer paid much attention to.

like I said its a complex system. I suggested inserting debug messages to see it working while you play, so you can learn how it works (even if you don't understand the design, which is the current situtation). That would include learning about min-max values for events.

Do you need help adding the test code?
https://forums.taleworlds.com/index.php/topic,347990.msg8335287.html#msg8335287
Well I have never seen this error before and I used brf to create a scene prop to add into my module but I build it without any error , I opened my game and it broke Idk how to fix it so I have to delete the scene prop in my module  and it work again maybe is it too old to work on new module or something wrong  :???: And I don't touch any warband engine it just I added scene prop and it broke
 
How do i change how many times the bow shots before reloading? and how do i increase the Health of a Unit without increasing its strenght, i want a unit with a lot of HP but i don't want it to One shot everything (which is the case if i increase the HP by strenght).

I want to create a ''super archer'' companion, but i can't make it work without a VERY fast bow with HIGH shooting rate, i tried setting the Speed and Shot speed in morgh to 500 but it doesn't help, the unit stops before firing the arrow, i want it to fire very fast in a quick sequence like a machine gun.

If someone could explain that for me i would be very grateful.
 
DeuxGzuis 说:
How do i change how many times the bow shots before reloading? and how do i increase the Health of a Unit without increasing its strenght, i want a unit with a lot of HP but i don't want it to One shot everything (which is the case if i increase the HP by strenght).

I want to create a ''super archer'' companion, but i can't make it work without a VERY fast bow with HIGH shooting rate, i tried setting the Speed and Shot speed in morgh to 500 but it doesn't help, the unit stops before firing the arrow, i want it to fire very fast in a quick sequence like a machine gun.

If someone could explain that for me i would be very grateful.


1. For bow machinegun you can use "add_projectile" command.  It lauches new missile from desired point to choosen direction. Just set some mission template triggers to make it shoot multiple times when you draw and hold arrow.

2. You can use "agent_set_max_hit_points" command to increase agent hp in mission.

Above ways need you to edit module system yourself. Morgh wont do in this case.
 
HarryPham123 说:
And I don't touch any warband engine it just I added scene prop and it broke

you did not understand that comment, so lets try again:

1) think of the game as:
  1.1) Engine (warband.exe)
  1.2) Module (the current game)

2) When you launch the game the engine loads and analyses data from your module, like the .txt files (scripts.txt, module.ini, etc), and it also loads the assets (music, graphics, ...)
While doing this it has some sanity checks to verify that the stuff is correct. Some bugs on your module will be detected at this phase and will crash the game, telling you to fix it first

3) When you are playing the game the engine also loads new data, and may find critical errors. It will show you the warning widow window so you can go and fix it

That includes sounds, music, scene props, items... not only game code

4) If you play on edit mode you will see more warning than otherwise (player mode)

You did not break the engine. You broke rules, so the engine is telling you to fix them. Its like driving on the wrong side of the road.



DeuxGzuis 说:
How do i change how many times the bow shots before reloading?

not related to your machine gun design. To have a bigger clip (more ammo before reload) use max_ammo(xxx) like in this:
插入代码块:
 ["tutorial_throwing_daggers",  "Javelins", [("javelin",0),("javelin_carry", ixmesh_carry)],  itp_type_thrown |itp_primary|itp_bonus_against_shield ,itcf_throw_javelin|itcf_carry_quiver_back|itcf_show_holster_when_drawn, 
200, weight(1)|difficulty(0)|spd_rtng(90) | shoot_speed(28) | thrust_damage(24 ,  pierce)|max_ammo(4)|weapon_length(65)|accuracy(99),imodbits_thrown ],

DeuxGzuis 说:
and how do i increase the Health of a Unit without increasing its strenght
instead of HP you could give that unit a special armor with higher protection. Just remember to balance it, otherwise you may end up with a immortal troop hehe
 
So, a bit of a 'philosophical' question: I seem to remember invasion scripts in older Mount and Blade versions. After a period of time, horders would spawn in the map and make war, peace etc. So, I'm wondering, are they still there? I am not talking about third party scripts, just Native codes and also, not for any particular reason, for any specific mod. I just thought about it the other day and thought it would be cool to have those ready and waiting.
 
插入代码块:
def check_syntax(entity, parser, uid = 0):
    print entity
    print parser
    print uid
	    # Handle injections
	    if type(entity) == tuple: entity = list(entity) # To guarantee we can make insertions
	    if type(entity) == list: entity = handle_list_injections(entity)
	    # Process entity
	    if type(parser) == tuple:
		    if type(uid) == int:
			    if not isinstance(entity, list): raise MSException('illegal top-level entity %r, tuple or list expected' % entity)
			    try:
				    possible_uid = entity[uid]
			    except IndexError:
				    raise MSException('failed to retrieve identifier at position #%d in %s' % (uid, compressed_tuple(entity)))
			    if type(possible_uid) != str:
				    raise MSException('%r is not a legal identifier at position #%d in %s' % (possible_uid, uid, compressed_tuple(entity)))
			    uid = internal_identifier(possible_uid)
		    index = 0
		    repeating = None
		    output = []
		    try:
			    for subparser in parser:
				    if subparser == SCRIPT:
					    if type(entity[index]) != list:
						    raise MSException('expected script but found %r at position #%d in %s' % (entity[index], index, compressed_tuple(entity)))
					    output.append(entity[index])
					    index += 1
				    elif subparser == AGGREGATE:
				  	    if type(entity[index]) not in (int, long, AGGREGATE):
						    raise MSException('expected aggregate value but found %r at position #%d in %s' % (entity[index], index, compressed_tuple(entity)))
					    output.append(entity[index])
					    index += 1
				    elif subparser == REPEATABLE:
					    repeating = []
					    output.append(repeating)
				    elif type(subparser) == dict:
					    try:
						    output.append(check_syntax(entity[index], subparser['check'], uid))
						    index += 1
					    except IndexError:
						    output.append(deepcopy(subparser['default']))
					    except MSException:
						    output.append(deepcopy(subparser['default']))
				    else:
					    if repeating is None:
						    output.append(check_syntax(entity[index], subparser, uid))
						    index += 1
					    else:
						    try:
							    while True:
								    repeating.append(check_syntax(entity[index], subparser, uid))
								    index += 1
						    except IndexError:
							    break
						    except MSException, e:
							    raise MSException('incorrect syntax at position #%d in %s' % (index, compressed_tuple(entity)), *e.args)
		    except IndexError:
			    print formatted_exception()
			    raise MSException('not enough elements in module `%s` entity `%s` (%d total): %s' % (WRECK.current_module, uid, len(entity), compressed_tuple(entity)))
		    if index < len(entity):
			    WRECK.errors.append('too many elements in module `%s` entity `%s` (%d parsed out of total %d): %s' % (WRECK.current_module, uid, index, len(entity), compressed_tuple(entity)))
		    return output
	    if type(parser) == list:
		    output = []
		    for index in xrange(len(entity)):
			    try:
				output.append(check_syntax(entity[index], parser[0], uid))
			    except MSException, e:
				   raise MSException('failed to parse element #%d' % (index, ), *e.args)
		    return output
	    if parser == troop_item:
		    if type(entity) == list:
			    return check_syntax(entity, (int, int), uid)
		    else:
			    return [check_syntax(entity, int, uid), 0]
	    elif parser == int:
		    if type(entity) == str: entity = convert_string_id_to_variable(entity)
		    if isinstance(entity, VARIABLE):
			    if not entity.is_static: raise MSException('value of %r is undefined at compile time' % entity)
		    elif type(entity) not in (int, long):
			raise MSException('cannot convert value %r to integer' % (entity, ))
	    elif isinstance(parser, UID):
		    if type(entity) == str: entity = convert_string_id_to_variable(entity, parser)
		    if isinstance(entity, VARIABLE):
			    if not entity.is_static: raise MSException('value of %r is undefined at compile time' % entity)
		    elif type(entity) not in (int, long):
			    raise MSException('cannot convert value %r to integer' % (entity, ))
	    elif parser == float:
		    if type(entity) == str: entity = convert_string_id_to_variable(entity)
		    if isinstance(entity, VARIABLE):
			    if not entity.is_static: raise MSException('value of %r is undefined at compile time' % entity)
		    elif type(entity) not in (int, long, float):
			    raise MSException('cannot convert value %r to float' % (entity, ))
	    elif parser == str:
		    if entity == 0: entity = '0' # DIRTY HACK
		    elif entity == '': entity = '_' # Fix for CTD
		    elif type(entity) != str:
			    raise MSException('value %r must be a string' % (entity, ))
	    elif parser == id:
		    # TODO: identifier validity check
		    if (type(entity) != str) and (entity not in set([0])): raise MSException('value %r is not a valid identifier' % (entity, ))
	    elif parser == file:
		    # TODO: filename validity check
		    if type(entity) != str: raise MSException('value %r is not a valid filename' % (entity, ))
	    elif type(parser) == str:
		    if entity != parser: raise MSException('value %r must always be a string constant %r' % (entity, parser))
	    else:
		    raise MSException('unknown validator type %r' % (parser, ))
	    return entity
I destroyed my spacebar, but it still gives me the same error. I think I might just reinstall it.
 
Madijeis 说:
I destroyed my spacebar, but it still gives me the same error. I think I might just reinstall it.

you are still having indentation errors. Its simple, each scope belongs to a new block.

Madijeis 说:
    print uid
    # Handle injections
    if type(entity) == tuple: entity = list(entity) # To guarantee we can make insertions

why are those lines, inside the same scope, using different indentation?

you can refer to the documentation (linked earlier) or some Python 101 guide if you need more examples. Or just forget about Python if that is too complicated for now, and focus on modsys.
 
So i never modded before and i did what the ''The Ultimate Introduction to Modding'' stated and i installed both of them, but how do i mod the files from another mod.

For example, i want to mod some of the Prophesy of Pendor troops, but it doesn't have any .py in the PoP folder, and the .py that appears in the Module System folder, is from native warband.
 
Some mods will let you have their py files. Others won't. If a mod won't let you have those files than you can not get those files. And that is that.
 
PPQ_Purple 说:
Some mods will let you have their py files. Others won't. If a mod won't let you have those files than you can not get those files. And that is that.
So that means i can't create my own custom units in the PoP mod? just for personal uses, i wanted to give 500+ HP to a unit without raising its strength.

Thanks for answering :smile:
 
DeuxGzuis 说:
So that means i can't create my own custom units in the PoP mod? just for personal uses, i wanted to give 500+ HP to a unit without raising its strength.

there are different forms of modding, each with its own complexity level and limitations.

For example: if all you want to do is change some troops stats, items, etc, you can use a tool called "Morghs" that works with the .txt files.
https://forums.taleworlds.com/index.php/topic,105928.0.html

(won't work for the 500HP hack, but you could give the troop a ubber armor instead)

There are a few changes/tweaks you can do using a savegame editor
https://forums.taleworlds.com/index.php/topic,295270.0.html

There are tweaks you can do with the .txt files. Some are listed on threads (check the mod forum). There is also a tool that works for several mods:
https://forums.taleworlds.com/index.php/topic,101731.0.html

You can work with graphics (like adding a new sword) using this
https://forums.taleworlds.com/index.php/board,215.0.html

and so on.

Modsys (game source) gives you more freedom, as you can change pretty much anything on a module. But that requires tech know-how (coding), etc, as you saw on the guide you followed for Native.
 
kalarhan 说:
DeuxGzuis 说:
So that means i can't create my own custom units in the PoP mod? just for personal uses, i wanted to give 500+ HP to a unit without raising its strength.

there are different forms of modding, each with its own complexity level and limitations.

For example: if all you want to do is change some troops stats, items, etc, you can use a tool called "Morghs" that works with the .txt files.
https://forums.taleworlds.com/index.php/topic,105928.0.html

(won't work for the 500HP hack, but you could give the troop a ubber armor instead)

There are a few changes/tweaks you can do using a savegame editor
https://forums.taleworlds.com/index.php/topic,295270.0.html

There are tweaks you can do with the .txt files. Some are listed on threads (check the mod forum). There is also a tool that works for several mods:
https://forums.taleworlds.com/index.php/topic,101731.0.html

You can work with graphics (like adding a new sword) using this
https://forums.taleworlds.com/index.php/board,215.0.html

and so on.

Modsys (game source) gives you more freedom, as you can change pretty much anything on a module. But that requires tech know-how (coding), etc, as you saw on the guide you followed for Native.

Thx for the reply, i will try these links, have a good night :smile:
 
kalarhan 说:
Get Lav's modules (for reference, so you can check his header_operations.py)

Hey, after ages I'm back with another question! Specifically about this. Lav has a lot of modules, is there a specific one I should download or will any of them work?
 
状态
不接受进一步回复。
后退
顶部 底部