Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
jacobhinds said:
I mean an actual zero. It'll save you time to set this template troop's face codes directly rather than with a constant.

ok, ill try it out tomorrow, as im fighting my eyes to keep them open right now. Thanks for the help.
 
Hi,
I added player faction culture, some troops, made them recruitable for both player and NPCs and I've also made recruited troop type based on the current faction. All of this seems to work fine, but after the start of the game, lords and towns/castles don't get any troops at all. Since I haven't editted any od the starting scripts yet, I don't know what could cause that.
I'm using Diplomacy 4.2 as a base. Maybe it's the cause, but I doubt it.

Thanks for any help
 
Howdy, just wondering if anyone might know the cause to a bizarre issue that appears to be plaguing any custom factions integrated into a little mod I'm making.

The issue:
The custom factions declare war as normal, like any other faction, but instead of marching against their foes they tend to group up around the nation's capital (following the marshal) before eventually dispersing without actually setting out. All three (so far) added custom factions have this issue, though none of the vanilla factions have this problem - it is specific to the custom factions and only the custom factions.

Basically it appears the marshal is incapable of selecting a target, and so eventually the ai gives up and all the lords disperse, heading back to their castles, villages or to just patrol (other behaviour is working normally).

I am using native as a base, without any scripts changing diplomacy or what not (I've added alot of other content and scripts, but none of them even remotely touch the behaviour of factions). I may integrate the diplomacy mod, but I want to solve this issue before I actually consider it properly (or choose to do my own stuff).

If anyone could give me some help, insight or guidance on this issue, it'd be greatly appreciated!


 
jacobhinds said:
The only thing i can think of is that you left out a king or something, or perhaps the faction or their centres are out of a range. In either case you should show us what you've added for each faction.

It's probably a bit too much to post everything, so I'll do a bunch load of bullet points and some snippets (troops is the biggy - 60 lords, 60 ladies and 3 kings). Also, I forgot to mention that I am using 'W.R.E.C.K' as well, integrated into the module some time after I started working on (was a bit of a pain because of some of the changes WRECK made, but I've found it to have been worth the effort so far, which is the reason for the changes in the below code from fac_faction_x to fac.faction_x).

I've referred to this tutorial here: http://forums.taleworlds.com/index.php/topic,128647.0.html to set up the factions, and basically followed and validated each step.

All of the factions have a faction leader / king and 20 'Knights' and Ladies (Until I can be bothered to sort out the aristocracy for a smaller number of lords and ladies) in the appropriate positions within the module troops file. Below is the examples, the new kings have been placed directly after the native kings, though are obviously placeholders.

Code:
  ["kingdom_6_lord",  "Sultan Hakim",  "Hakim",  tf_hero, 0,reserved,  fac.kingdom_6,[itm.warhorse_sarranid,     itm.mamluke_mail,          itm.sarranid_boots_c,       itm.sarranid_mail_coif,  itm.mail_mittens,      itm.sarranid_cavalry_sword,    itm.tab_shield_small_round_c],         knight_attrib_4,wp(220),knight_skills_5|knows_trainer_5, 0x0000000a4b103354189c71d6d386e8ac00000000001e24eb0000000000000000, rhodok_face_old_2],
#### New Lords
  ["kingdom_7_lord",  "High Chief Hargus",  "Hargus",  tf_hero, 0,reserved,  fac.kingdom_7,[itm.arrows,itm.quarter_staff,itm.short_bow,itm.black_hood,itm.padded_leather,itm.leather_boots],          knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],
  ["kingdom_8_lord",  "King Tartus",  "Tartus",  tf_hero, 0,reserved,  fac.kingdom_8,[itm.maul,itm.javelin,itm.fur_covered_shield,itm.skullcap,itm.ragged_outfit,itm.hide_boots],          knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],
  ["kingdom_9_lord",  "Doge Estmond",  "Estmond",  tf_hero, 0,reserved,  fac.kingdom_9,[itm.maul,itm.javelin,itm.fur_covered_shield,itm.skullcap,itm.ragged_outfit,itm.hide_boots],          knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],

The lords and ladies have been delt with in the same way, and checking ingame demonstrates that the:

  • Aristocracy is setting itself up properly - no invalid (negative or low) ages and weird relations. Members of new factions have their relations set up nicely
  • They own the fiefs they are meant to own. In this case, for two of the factions it is a castle and a village
  • The lords and fiefs have the correct reinforcements - so lack of troops  is not an issue (the opposite at the moment, actually due to lack of balancing).
  • Faction leader is assigned correctly and without issue. A marshal is also randomly assigned
  • Caravans have been set up with trade routes - caravans move in and out and trade with the new centres perfectly fine (in the case of the third faction which actually has towns, the other two have a single castle and village so no trade going on, so nothing is out of range for that at least).

Two of the three factions are minor factions with lands located within the borders of the native factions. These two minor factions own a castle and a village currently, their survival completely reliant on chance (delcaring war and managing to take a fief before being stomped), otherwise their lords defect slowly over time due to the lack of fiefs - something I will solve in the future through changes to the aristocracy script - distance for these two factions should not be an issue, considering the distance between nords and sarranids, for example, is considerably greater.

Basically, everything works bar warring in an appropriate fashion. For example, one of the factions

Code:
("kingdom_8",  "Kingdom of Barth",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x8B7355),

Will declare war on Swadia. It's land are located within the Swadian lands, but instead of campaining against the swadian fiefs, the lords will patrol the faction's castle and village until the marshal calls them to meet at the castle - all of them group up without issue, but instead of marching against any swadian fiefs, the army just sits there until they eventually give up and continue to patrol. If you speak to the marshal, he tells the player that he is waiting there for all of the lords in the faction - all of them are present and following, though.

This is the same for one of my other factions:

Code:
  ("kingdom_9",  "Noble Republic of Zharkan",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x72A8FA),

Which also does exactly the same thing, though on the other hand this faction doesn't own a single castle and village, but instead owns 4 towns and 12 villages.

If you need any specifc details concerning any steps, I can post them - I've validated everything more than a few times, and though I admit I could have missed something, I'm pretty sure I've nailed everything for the most part - well, except this issue is trying to tell me otherwise.

*Though* I do have a small bug; there is an lack of available banners at the moment for every newly added lord to have a banner - I don't see why this would have a negative effect on anything beyond visuals, let alone something so specific and unrelated, but I thought I might mention it just in case.
 
Hi all,
I just finished up reading the Ultimate Guide to modding and i was interested in making some sort of mod.
I had the Idea (Which I got from Total War, but saw done similarly with a pre-existing mod) of making a mod where you can build a small "fort" from the camp scene, It would require 10,000 Denar and tools, It would appear on the map and have a small scene, It would store a garrison but not be considered a fief.

I'm not asking someone to make this, I want to be able to make it myself, but I have no concept of where to start. Any help is appreciated,

Regards,
Alex.
 
doomblood said:
Hi all,
I just finished up reading the Ultimate Guide to modding and i was interested in making some sort of mod.
I had the Idea (Which I got from Total War, but saw done similarly with a pre-existing mod) of making a mod where you can build a small "fort" from the camp scene, It would require 10,000 Denar and tools, It would appear on the map and have a small scene, It would store a garrison but not be considered a fief.

I'm not asking someone to make this, I want to be able to make it myself, but I have no concept of where to start. Any help is appreciated,

Regards,
Alex.

As it happens, Lumos has done more or less what you are looking for with extra features here, all of which is open source - so if you're interested in making a mod built around that sort of feature, that could be a good starting point to learn and thus expand upon further (if that is what you're interested in doing). :wink:
 
N0body said:
doomblood said:
Hi all,
I just finished up reading the Ultimate Guide to modding and i was interested in making some sort of mod.
I had the Idea (Which I got from Total War, but saw done similarly with a pre-existing mod) of making a mod where you can build a small "fort" from the camp scene, It would require 10,000 Denar and tools, It would appear on the map and have a small scene, It would store a garrison but not be considered a fief.

I'm not asking someone to make this, I want to be able to make it myself, but I have no concept of where to start. Any help is appreciated,

Regards,
Alex.

As it happens, Lumos has done more or less what you are looking for with extra features here, all of which is open source - so if you're interested in making a mod built around that sort of feature, that could be a good starting point to learn and thus expand upon further (if that is what you're interested in doing). :wink:

Thanks for the response,
As it happens that's actually the mod I was referring too!
I was wondering how he did it/ how I could disect it

 
Concerning my posts on the previous page; the issue seems to have sorted itself out, though I haven't a clue as to what was causing the issue nor how I actually 'fixed it', but it could have been due to a single nord faction castle party being inaccessible (had accidently be nudged onto a river enough to prevent anyone from getting to it). Weird, as no other factions were affected.

doomblood said:
N0body said:
doomblood said:
Hi all,
I just finished up reading the Ultimate Guide to modding and i was interested in making some sort of mod.
I had the Idea (Which I got from Total War, but saw done similarly with a pre-existing mod) of making a mod where you can build a small "fort" from the camp scene, It would require 10,000 Denar and tools, It would appear on the map and have a small scene, It would store a garrison but not be considered a fief.

I'm not asking someone to make this, I want to be able to make it myself, but I have no concept of where to start. Any help is appreciated,

Regards,
Alex.

As it happens, Lumos has done more or less what you are looking for with extra features here, all of which is open source - so if you're interested in making a mod built around that sort of feature, that could be a good starting point to learn and thus expand upon further (if that is what you're interested in doing). :wink:

Thanks for the response,
As it happens that's actually the mod I was referring too!
I was wondering how he did it/ how I could disect it

The source is included in the download -> Outposts! v0.8.7z\Outposts!\Outposts! Kit 0.8 Source\

Basically, have a look through the files provided and see what you can work out - it's quite well documented, so it should be easy enough, otherwise this thread is a good place to ask if you encounter any hiccups. :wink:
 
How can i port the network message into the singleplayer ?

I've got a network message like that.

Code:
(else_try),
	    (eq, ":event_type", multiplayer_event_cannon_reload_zero),
		(store_script_param, ":instance_id", 3),
		
        (scene_prop_set_slot, ":instance_id", mp_cannon_reload, 0),
	  (else_try),
	    (eq, ":event_type", multiplayer_event_cannon_reload_one),
		(store_script_param, ":instance_id", 3),
		
        (scene_prop_set_slot, ":instance_id", mp_cannon_reload, 1),
	  (else_try),
	    (eq, ":event_type", multiplayer_event_cannon_reload_two),
		(store_script_param, ":instance_id", 3),
		
        (scene_prop_set_slot, ":instance_id", mp_cannon_reload, 2),

And i think this is the cause of bugged cannons:

ZWm56g.jpg

how can i make usable this network message in the singleplayer ?

and,what the initialize_scene_prop_slots script does ?
 
HyperCharge said:
how can i make usable this network message in the singleplayer ?
Not sure, but I believe the only way is to rewrite it in mission_template in singleplayer way.

HyperCharge said:
and,what the initialize_scene_prop_slots script does ?
Sets slots to zero. During the mission prop slots may be set to certain values to identify a special state of the prop.
initialize_scene_prop_slots resets these values that should revert prop to the initial state.
 
Rongar said:
HyperCharge said:
how can i make usable this network message in the singleplayer ?
Not sure, but I believe the only way is to rewrite it in mission_template in singleplayer way.

HyperCharge said:
and,what the initialize_scene_prop_slots script does ?
Set slots to zero. During the mission prop slots may be set to certain values to identify a special state of the prop.
initialize_scene_prop_slots reset with values that should revert prop to the initial state.

Thanks! :smile:
 
Status
Not open for further replies.
Back
Top Bottom