Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I have a personal mod in which I've added a new skeleton race who have no facial diversity. When this race is selected for the main character, all chars with the tf_randomize_face tag have the same bald, clean shaven face. Presumably they're pulling that randomization from the skeleton race's range, which is 0 to 0, resulting in them all having the same non-descript features. How can I avoid this from happening? Thanks!
 
All together, I have about 700 lords and ladies in my mod.

How big of a stress is that putting on the script side of things, and how much would it make the map travelling lag due to the many calculations being made?
 
Cozur said:
All together, I have about 700 lords and ladies in my mod.

How big of a stress is that putting on the script side of things, and how much would it make the map travelling lag due to the many calculations being made?

you shouldn't have lag issues with the lords alone. To test this create a game with them but no triggers (events), so they just travel around being merry.

what may impact your game are things like triggers doing special calculations for them, which you can remove/change to reduce impact by frame. VC, as a example, changed the computations of centers to spread it over the entire week (think 1 event every second, instead of 1000 events on one second). That is a way to improve performance.

you will need to test each trigger and see their impact if you start having issues.
 
Cozur said:
Do you know of any especially taxing triggers?

can't really answer that for a mod, as each one will be different based on other factors like new features, tweaks, etc. If you were playing Native that would be a different conversation.

but as I mentioned above it is a simple task to measure impact. Just create a fork of your project and test groups of triggers and see if they have negative impact on performance, you shouldn't have that many in this category. Once you have the list (example 8 in 50), you can analyse them case by case and see what you should do to improve performance.
 
Khamukkamu said:
Thanks Confirmed that it was the problem, the player was running 1.157. He updated to the most recent one and the errors stopped.

you should experiment with operation "get_operation_set_version". You can disable the game or add a warning if a player is using a outdated engine version this way.
 
is there a limit on how many parties can be made in the world(campaign map) since i have many villages castles /towns take for example only villages i have more then 450 village and the amount of villagers spawning is crazy to be honest and its causing lag and performance issues without even talking about lords which i have about 600+ (without ladies which i don't think they can be counted here) and of course other parties bandits .....hunters.....refuges ....ect so its more then 1000+ any idea on how i can work around it to increase performance ?
PS; i tried your last tip/advice kalarhan and reduced some of the stuff in scripts...ect files and it helped a little but still lag :smile: to much for too many things
Imad
 
Somebody said:
That's a weird interaction, but if tf_randomize only works when troops are added as visitor you can try reverting the player's race before entering a tavern scene for instance.

Unfortunately I do need to call the player's gender (to determine their race) during various scenes, especially the tavern, for various dialogue/quest interactions.

Anyone have any ideas for resolving this issue (quoted below)? I'm sure there has to be a fix. Thanks!

Syke said:
I have a personal mod in which I've added a new skeleton race who have no facial diversity. When this race is selected for the main character, all chars with the tf_randomize_face tag have the same bald, clean shaven face. Presumably they're pulling that randomization from the skeleton race's range, which is 0 to 0, resulting in them all having the same non-descript features. How can I avoid this from happening? Thanks!
 
Syke said:
Unfortunately I do need to call the player's gender (to determine their race) during various scenes,

you are not restricted in this by the actual player gender and operations. You could, as a example, save that information on a global "$player_gender".



imado552 said:
is there a limit on how many parties can be made in the world
depends on your mod (triggers/events), your computer and your world map quality. You should stress test your mod and map to figure out how many moving parties (lords, bandits, etc) the game can handle for you without any events (delete all stuff from module_triggers and module_simple_triggers). After that you can see the impact of your big events and update your limit with that information.

a couple well know cases: 1257AD removed parties like villagers from the game; VC changed the computation system to spread it around the entire week. Both were done to improve performance and fix the map lag.

imado552 said:
450 village
about 600+  lords
do you need that much? World design is abstract, you can represent places in different ways, not just with a map icon to visit. Placing too many villagers close to each other, as a example, wouldn't look good.

also there is a difference on performance for static and dynamic parties. Dynamic ones require the engine to compute path (travel from A to B), and AI reactions (see another party nearby, should I run, run to where, am I safe, etc). So you need to break down your tests between both types.
 
kalarhan said:
depends on your mod (triggers/events), your computer and your world map quality. You should stress test your mod and map to figure out how many moving parties (lords, bandits, etc) the game can handle for you without any events (delete all stuff from module_triggers and module_simple_triggers). After that you can see the impact of your big events and update your limit with that information.
the map is "japan" i tested it with native locations and such and there is no lag on it then i tested with few newer parties (and modified native ones) still good but when the thing grew and the parties spawned increased damn the lag become a problem esp when you fast forward
i'll try to see what i can take out more /fix to help on those two files !
and i think the last time i tested (with native + few added stuf) there were more then 480 parties (don't count the ones below XD)



kalarhan said:
a couple well know cases: 1257AD removed parties like villagers from the game; VC changed the computation system to spread it around the entire week. Both were done to improve performance and fix the map lag.
mm 1257AD solution is bad for me since this is the thing that most player will end up doing at some point attacking villagers (because of war screw honor we need to survive XD)+refuges for raided villages and other features

VC solution seems ...good i'll try to see what they have done in their MS ! any ideas where should check (the files ) to get an idea on what i should work on ? thanks



kalarhan said:
imado552 said:
450 village
about 600+  lords
do you need that much? World design is abstract, you can represent places in different ways, not just with a map icon to visit. Placing too many villagers close to each other, as a example, wouldn't look good.
since my mod is a historical accurate mod set during the sengoku jidai era i have to add many things (that number was lowered with a lot of things i had like more then 1000+ lord and over 700 villages and 250+ castles and 100+ towns and i lowered that number with as much as i care to not break the fun of replaying history if it wasn't for that i wouldn't even mind making less then 100 lord and villages will make things easier for me



kalarhan said:
also there is a difference on performance for static and dynamic parties. Dynamic ones require the engine to compute path (travel from A to B), and AI reactions (see another party nearby, should I run, run to where, am I safe, etc). So you need to break down your tests between both types.
i'll try to do that and see what i can do



PS: just a question i know that you can add new scenes to towns via new menus ex adding temples (visit the temple ...etc in town PS: how should i go around if i want to add it to only one specific place ?) can i do that with villages as well ? and with certain villages or only in general ?
 
imado552 said:
mm 1257AD solution is bad for me

add new scenes

think about that design decision. You said the player (singular entity in the world) will need to hunt down villagers. Player has a travel speed and small visible area, so the player can't see most of the villagers in the world. Do you need to have 1000 villagers walking around, if the player can only see/interact with 5? Why not create villagers for the area close to the player, and kill them off if the player moves away? That is just a quick example on how you can change the game design to improve performance, and still keep the heart of your feature intact. Just remove the basic relation between villagers and economy, and they are not important any more.

new scenes: check "game_start" script and how it makes the setup of scenes for static locations. It is a simple use of slots to store the information. You can change, adapt, use it, etc

 
kalarhan said:
think about that design decision. You said the player (singular entity in the world) will need to hunt down villagers. Player has a travel speed and small visible area, so the player can't see most of the villagers in the world. Do you need to have 1000 villagers walking around, if the player can only see/interact with 5? Why not create villagers for the area close to the player, and kill them off if the player moves away? That is just a quick example on how you can change the game design to improve performance, and still keep the heart of your feature intact. Just remove the basic relation between villagers and economy, and they are not important any more.
Never though of that i'll try to see what i can do using that (even though i'm not sure what to start with but....hahahah)



kalarhan said:
new scenes: check "game_start" script and how it makes the setup of scenes for static locations. It is a simple use of slots to store the information. You can change, adapt, use it, etc

on it godd sir! thank you!
 
Cozur said:
What determines the loot received after raiding a lair? Like a Mountain Bandit Lair etc?

depends on your mod. The basic system for loot is to let the engine select some gear from the defeated troops and add to the loot screen, and use a game_menu to apply some kind of rules and generate a monetary reward. The cash is usually spread out among your army, and the player gets a bigger share (say 10 shares for player, 3 for companions, 1 for soldiers). You can also check the script "party_calculate_loot".

as you can replace/enhance the scripts/menus you are free to modify this to your own design
 
I was wanting to implement a very basic magic system in my game. I activated one of the reserve skill slots to implement a new governing skill. I was then hoping to input items that used this skill as their 'difficulty' check. Is there any way to do this? Can I create a new item type? Ideally, I'd like to have some 'thrown' spells and some 'self' spells (probably just using the victory animation). Is this feasible? Any advice would be much appreciated.
 
Syke said:
I was wanting to implement a very basic magic system in my game. I activated one of the reserve skill slots to implement a new governing skill. I was then hoping to input items that used this skill as their 'difficulty' check. Is there any way to do this? Can I create a new item type? Ideally, I'd like to have some 'thrown' spells and some 'self' spells (probably just using the victory animation). Is this feasible? Any advice would be much appreciated.

Its perfectly possible with existing item types. There are some fantasy mods with spells. Usually spell is just heavly modifed throwing weapon or simmilar.
 
Status
Not open for further replies.
Back
Top Bottom