PDA

View Full Version : Few Modding Questions



Blaidd
07-19-2004, 05:17
Greetings All,

This is kind of a mixed intro/questions post. The questions are near the bottom. Sorry, I'm rather wordy, but please bear with me.

I'm a second year Computer Science Major. I'd like to get a job in the Gaming industry once I finish school, so I spend a lot of time playing and writing games. I've been playing M:TW on and off since it came out and I love the game, but the original campaigns were beginning to get a bit dull so I stumbled across this site yesterday and thought, 'hey cool, mods'.

Just playing around, I've been modding a campaign based on a fantasy world that some friends and I created a few years back. Things are going really well. I used the England map, but renamed and reorganized all the factions, changed up the Names, added some Kings and Heroes. I love creating things and seeing them in a game. I even fixed Portraits for my a couple factions by borrowing certain pictures from the other factions. I could hug whomever insisted that everything be so well documented inside the code. I'll never gripe about a Professor making me comment things again. It sure helps a lot.

I'm working on units now. I have four working custom units already (thanks to the guides on these forums), but I have a few questions. Sorry if someone has already addressed these elsewhere I have read the guides and quite a few topics on these Forums and I don't remember these.

1) How do you set a unit so that it can only be built in certain provinces? Such as the Highland Clansmen in the original game. I would like the type of 'peasant' unit trained to be the same in each region regardless of who owns it. For example: If the Knights conquered my 'Highlands' provinces they would be able to build 'Clansman' rather than Medieval-style 'Peasants' because there are no Peasants living in the Highlands to be conscripted.

2) On the above note where do you set the +1 valor bonus to 'This Type of Unit' for each region?

3) Is there any way to make the TOPLESSLOON ride a horse short of redoing the graphics files? I tried putting him on a horse in unit_prod and he ran beside it (which might make some interesting units) and since there are CAV folders, I'm assuming the graphics in the CAV folders have been moved slightly to make the guy sit on the horse? It would be cool to have Mounted Celtic Warriors. :P

4) Is there any way to make a normal unit (I haven't modified or created any graphics files, I'm a Programmer not an artist) wield two swords instead of a sword and shield? They don't have to fight with it, just for artistic reasons. I tried copying the coords from weapons.txt into shields.txt and using that for the shield (hoping it would grab the sword graphic), but modifying shield.txt made the game refuse to load. I guess. After I changed it back it started working again. I was trying to make a Byz Infantry with two Swords.

5) What program would you use to edit the unit graphics just slightly? For example: I thought about using the Celtic Warriors graphics to make a Skirmisher unit for my Amazon faction. Unfortunately, I think Celtic Warriors have beards. (If I'm wrong about this, just pretend this is a theoretical example) So what program would I use to delicately edit out the beards (in a copy of the file) without messing anything up? I know this is on these forums somewhere, but there were so many programs mentioned in so many posts this is confusing.

6) Is there any way to rig it so that you can't build new units of a certain type, but you can repair them? My BodyGuard units are very strong and I wouldn't want a player or AI to create whole armies of them so I was going to try to make it so they only appear as BodyGuards and you can't build them, but it would still be nice if you could repair them. I don't think this is possible so it'll probably just mean you have to take care of them. Which is realistic. And nifty since you could whittle down the AI's BodyGuards (since they are so strong). I just think it's kinda cruel to breed Heirs to replace my good generals' units. :P

7) In the stories/worldbuilding/rpg stuff the 'Barbarian' type faction used trained DireWolves in battle (not mounts, just BIG attack dogs). I'd like to add this to my mod, but I'm the worlds absolute worst artist. Has anyone done a wolf or even a large dog unit model that I might be able to use? I'm just doing this for fun so I wouldn't be distribting it except maybe to a RL friend or two.

Hrm. That's all for now. Thanks in advance for any assistance and Thanks to everyone who has posted a guide on this Forum. They sure came in handy. And I'm sorry for any spelling errors that crept in here, it's late and this is a lot longer than I expected.

-Blaidd

Papewaio
07-19-2004, 05:37
Blaidd welcome to the Org https://forums.totalwar.org/forum/non-cgi/emoticons/wave.gif ... I have a feeling you will not be a Junior Patron long... https://forums.totalwar.org/forum/non-cgi/emoticons/medievalcheers.gif

Yes Pseudo code and documentation seem such a bore... until you have to review your own programs https://forums.totalwar.org/forum/non-cgi/emoticons/eek.gif and realise those moments of inspire coding genius are not that easy to follow without comments.

Blaidd
07-19-2004, 06:32
Thanks for the welcome.

I remembered a couple more things I meant to ask.

8) Is it a really really bad idea to remove everything from the unit_prod and building files that your mod doesn't use? I have no idea why I want to do that, but it is bugging me. :P

9) At one point I set the Start Date for 1 AD (because I thought it might stop date events from popping up. I think I read somewhere they do that) and my King turned -65000 and some years old and died on the first turn. lol. When I changed the start date back to 1000 AD he turned 35. I know there are 'birth years' for heros, but does anyone know where these are set for kings? I don't think it asks for birth year in the famous kings section. Not important, just an oddity that I noticed.

Blaidd
07-20-2004, 20:23
I've figured out the answers to some of these, so I'll go ahead and post them incase anyone else is wondering.

1) This is done in Column 51 of unit_prod entitled Region Label. I found it while resizing the columns in the Gnome Editor.

2) Column 13 of unit_prod it says 'Some regions provide discounts on troops or buildings', but actually it gives the +1 valour bonus. You have to be sure to remove the bonus for any other troops that might already exist in that land region though.

Don't know how I managed to miss those.

3) After a little more research, I'm guessing no.

4) Still working on this. I figured out how to make units change weapons for different actions. (Lances for charge, Swords for fight), but I haven't been successful in creating a unit that could dual-wield.

5) After a closer look at the unit graphics it seems most of them have beards. My Amazons have developed a sudden urge to wear black scarfs in combat (like the Aiel) :P

6) Turns out my bodyguard units are super-strong vs normal M:TW units, but since I'm modding the available units (Peasants, Spearmen, etc) to be more durable and realistic (you should see my modified Spearmen rip through a cavalry unit) the bodyguards are appropriately strong maybe even a bit weaker than they should be. I'll make them expensive and give them a couple year build time.

7) Still curious about this.

8) I took a lesson from the designers and changed all the units that SHOULDN'T be in my mod to Muslim (since my mod is based on the viking era) and deleted the chance of them appearing in rebellions in order to disable them. Worked great. Now they don't appear in Inns or Custom Battles or anything. You have to be sure to include every possible type of rebellion on some of the mod units though, because I think that may be what was causing some of my CTDs. Rebellions spawning with no possible units in them. Just a guess.

9) Haven't had a chance to play around with this, but I will. This has to be set somewhere because the King of each faction always starts the same age and they are different. If it was hardcoded setting my viking era campaign to 1000 AD should make them around 300 years old instead of 35.

https://forums.totalwar.org/forum/non-cgi/emoticons/medievalcheers.gif

Blaidd

Kali
07-21-2004, 10:49
https://forums.totalwar.org/forum/non-cgi/emoticons/biggrin.gif Hi Blaid,
Welcome to the Org,
to answer question 7. Check out the War of the ring thread (WoTR), or the Middle Earth forum. The modders involved in this project created Warg riders. Not sure if they created Wargs as seperate from there mounts or not but they might do for you.
As for 4, its possible. but you'd have to enter the coordinates where you want the 2nd sword to appear, for every image in every frame. 10-20 images per frame 12 frames in total. Look in Textures/Men/Items/Weapons and you'll get the idea.
5. To make slight alteration you'd either have to draw it into each new frame or make a new animation in 3ds max or whichever animation package your using. So no shortcut I know of
6. You can only retrain/repair units that you can build
8. Depends on your mod. If you want bodyguard units to be era specific, you need one entry per faction per era. Or they get shunted around. Apart from that I think you can pretty much do as you like in unit prod.
9. Is normal, if you change the starting date. I'm not sure if there's a way round it.
Good luck m8
~:wave