Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I seem to have a rather annoying issue with some custom troops I have made. I basically have 4 troops. All of them are ranged. The first is equipped with short range pistols. The second is equipped with medium range rifles, the third with short-range powerful guns, and the last very long ranged guns with high accuracy.

All except the fourth and last unit charge forward, shooting maybe twice while running at any enemies (or at me), and then proceed into mellee, which they are naturally not very good at. The fourth unit hangs back and shoots at the enemy. How can I get them to all do this? Whats the point of having ranged weapons when your men don't use them? What constitutes this change in behavior? Is it the accuracy of the weapon? The strength of the weapon compared to their sword?

If it is the accuracy, then that sort of destroys the purpose of having different specilized ranged weapons.
 
there have been a few topics on this subject and I'm not sure we've actually figured out what causes it yet.

If you want to go the fancy way, you could write code for units based on inventory items, or anything else you can cook up, that governs what they do. You can split them up into different teams, that can be accessed with different keys, etc.

Even AI wise, you could write up something using triggers. Like certain types of units will always try to keep a certain distance away from opponents, etc.

But the short and sweet of it is basically no, there's no easy way that I know of to fix your problem.
 
Ah, thats too bad, i'm not yet experienced enough to cook up something too complicated. I will look into it, as this is pretty important. Without the ability for them to hang back, the units are practically useless without a human controlling them.
 
I looked into it, and changed some things, it seems setting the accuracy to 100 totally fixed it, enemies would still charge, but now they behave properly, run will reloading, stop and shoot, that type of thing. Much better. Damages the balance alittle, but ends up being fairly realistic.
 
Hello!

I've tryed to make my own mod, so, i've read the tutorioas, i do what they says...

But, when i click on "build_module.bat" i see so many errors! Then, i undo all what i made, and retry... Without success.

I allow myself to ask for help!

There is my commands:

cmderror.jpg
cmderrors2.jpg

I don't know the way that i've for make so many errors, if anyone see what it don't running?!

Thank you.
 
Deathknight13 said:
Admosdean what version of python are you using? Also have you edited anything?

I'm using the version 3.0.1 of python. And and don't remenber that i've edited anything anywhere (of python).

double check all your commas and brackets in any files you've edited since the last time you built.

I will see that!

Thank!
 
I don't understand...!

For exemple: The first error
(file "process_init.py", line 4
  print "initializing..."
                          ^)


I open the file and there is this:

from module_info import *
import os

print "Initializing..."

try:
  os.remove(export_dir + 'tag_uses.txt')
except:
  a = []
try:
  os.remove(export_dir + 'quick_strings.txt')
except:
  a = []

What don't running? Are there an undesirable commas and brackets?

Edit: I'm instaling python 2.6. I will see if it will do anything.
 
captain lust said:
no problem, just don't forget to post back if it works

also, it's advisable to use python 2.6 for reasons i can no longer remember.

Python 3.0 simply isn't compatible with the M&B mod system.
 
It's running! It's running!

*dance*

camarche.jpg

It was just a problem with Python 3.0.

Thank you for your help Captain lust and all other!
 
Question: I'm adding additional ladders to siege scanes but AI can't see or use these ladders, also when I change the position of a ladder, AI simply going to the area where the ladder's old position is. Is it possible to make AI use new ladders?
 
Xendor said:
Question: I'm adding additional ladders to siege scanes but AI can't see or use these ladders, also when I change the position of a ladder, AI simply going to the area where the ladder's old position is. Is it possible to make AI use new ladders?
Edit the AI mesh in the scene editor.
 
it's in module_scripts.

there's a few things to change.

firstly, in module_troops you need to make sure you've set all the appropriate upgrades.

have you made new cultures for your factions? need to do that in module_factions.
Code:
      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),

need to replace the 5s with the number for your culture. then replace the trp references with the corresponding one for your new faction.

e.g.

Code:
      (faction_set_slot, "fac_culture_7", slot_faction_tier_1_troop, "trp_faction_7_recuit"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_2_troop, "trp_faction_7_militia"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_3_troop, "trp_faction_7_warrior"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_4_troop, "trp_faction_7_trained_warrior"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_5_troop, "trp_faction_7_elite"),

also, if you go a bit lower, there's a few things you can change which affect who appears in scenes when you engage in battles etc. (i think)

it's basically a matter of seeing where the existing factions are referenced and making references for your new factions.
 
Status
Not open for further replies.
Back
Top Bottom