PDA

View Full Version : Modding the demo



Mailman653
02-23-2009, 01:05
http://www.twcenter.net/forums/showthread.php?t=227956
Instructions

http://www.twcenter.net/forums/showthread.php?t=227982
Unpacker

http://www.twcenter.net/forums/showthread.php?t=227839
Detailed How-to

Mind you this is an Unofficial unpacker, but people on that website have made lots of advances including playing as the Americans, increasing unit sizes, adding new traits to units, even swapping the demo nations and adding France or Austria.

I figured this info would be useful for us Org's. Special thanks to Quadalpha for posting the intial link over at the demo discussion thread.

So lets get going guys, lets see what we can come up with now. The TWcenter folks are having their fun modding the demo, lets have ours. :charge:

Aemilius Paulus
02-23-2009, 01:11
Wow. Heck, people can technically and theoretically make a fully playable game out of a demo, could they not?? How legal is this anyway?

I burst into laughter when I saw the thread title.

Megas Methuselah
02-23-2009, 01:35
Wow, that is so cool.

pevergreen
02-23-2009, 01:35
I was looking for an unpacker. ^_^

Megas Methuselah
02-23-2009, 01:41
I always thought the land battle could use 5 more Line infantry on each side or something... :evilgrin:

Mailman653
02-23-2009, 01:59
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-02-2219-38-13-81.jpg
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-02-2219-56-54-51.jpg
Not quite working yet, the units spawn with no textures eventhough the overhead flag is correct. I tried editing the battle script file next but no change to the textures, even made things worse because I couldn't click on my units.
I think there is a possiblity that the *some* textures aren't with the demo, it would make sense if they are not meant to be playable. Oh, and here is a screen to make your jaw drop:
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-02-2220-30-26-53.jpg

The load times seem faster now, at least for me the opening video sequence doesn't stutter anymore and the game as a whole loooks like it is loading faster.

Alexander the Pretty Good
02-23-2009, 02:37
The platoon fire drill is brutal.

Mailman653
02-23-2009, 03:05
http://www.twcenter.net/forums/showthread.php?p=4506787#post4506787
Unpacks all the files except one, I'm unpacking things right now, I hope to find the textures and have a little fun.

Update:I found the textures, just about everyone has white coats, US and English alike, it left me wondering what and where the game determines what color a faction wears. For instance the muscians wear blue coats in the game yet the texture has them wearing white. I also took a look at the sound files, if the demo is any indication, one of the US voice actors is also one of the British voice actors which would solve the question of why the Americans sound English in some videos.

pevergreen
02-23-2009, 03:42
It just won't work for me. :cry:

Mailman653
02-23-2009, 04:09
Not quite sure what to say, I installed the Python 3.X, then I d/l the unpacker and put it in the right directory, clicked on it and off it went doing its thing.

pevergreen
02-23-2009, 04:19
Yeah, i think its because i tried to run the emp_unpacker.py before i properly installed python.

Or maybe because I'm on vista. Im asking for help over at the TWC.

Mailman653
02-23-2009, 05:26
I've stopped playing with the files but the textures really got me thinking as to how and where the game determines who wears what. For instance in that screen shot of Mexico they are clearly wearing some yellow/orange uniforms, yet in the actual textures there isnt a Mexican soldier texture. Everyone has white coats with different color facings and turnbacks.

I would love to see some of the uniforms get re-done, like giving the Brits artillery blue coats instead of red coats, and seeing some of the American uniforms tweaked.

lenin96
02-23-2009, 08:38
Have a look at this thread (http://www.twcenter.net/forums/showthread.php?t=227715) at TWC, someone had a 1400 man unit!

pevergreen
02-23-2009, 10:16
Not impressive. I've seen a guy have a 9001 unit of Grenadiers. Literally.

Of course the frame rate was something like 3 frames per minute, but even so.

lenin96
02-23-2009, 11:04
Not impressive. I've seen a guy have a 9001 unit of Grenadiers. Literally.

Of course the frame rate was something like 3 frames per minute, but even so.

Really? Can you post a link, because it would be great see that! :yes::2thumbsup:

pevergreen
02-23-2009, 11:24
https://g.imagehost.org/0672/OVER9000.jpg

from TWC.

lenin96
02-23-2009, 12:25
Thats big (big understatement).

Abokasee
02-23-2009, 13:57
Theres already Ancillaries, and to a degree slavery is in, but not in the Mass Cotton farm form, but more of the Cotton House:


--[[ Ancillary_African_Servant_02_Trigger ]]--

events.BuildingCompleted[#events.BuildingCompleted+1] =
function (context)
if conditions.CharacterType("minister", context) and conditions.CharacterMinisterialPosition("governor_america", context) and conditions.CharacterBuildingConstructed("large_cotton_plantation", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_African_Servant", 8, context)
end
return true
end
return false
end

I can confirm the return of turncoats:


--[[ Ancillary_Army_Ottoman_Turncoat_2_Trigger ]]--

events.CharacterCompletedBattle[#events.CharacterCompletedBattle+1] =
function (context)
if conditions.CharacterType("General", context) and not conditions.CharacterFactionName("ottomans", context) and conditions.CharacterFoughtCulture("middle_east", context) and conditions.CharacterWonBattle(context) and conditions.BattleResult("major_victory", context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Army_Ottoman_Turncoat", 17, context)
end
return true
end
return false
end

Another interesting Ancillary, seems there will be cultural ones as well including ones for unlockable/unplayable factions (well we can mod the demo... why not the main game?)


--[[ Ancillary_Assassin_Thug_Trigger ]]--

events.CharacterTurnEnd[#events.CharacterTurnEnd+1] =
function (context)
if conditions.CharacterType("assassin", context) and conditions.CharacterCultureType("indian", context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Assassin_Thug", 2, context)
end
return true
end
return false
end


--[[ Ancillary_Blood_Brother_2_Trigger ]]--

events.CharacterCompletedBattle[#events.CharacterCompletedBattle+1] =
function (context)
if conditions.CharacterType("General", context) and not conditions.CharacterCultureType("tribal", context) and conditions.CharacterFoughtCulture("tribal", context) and conditions.CharacterInTheatre(1, context) and conditions.CharacterTurnsInEnemyLands(context) >= 1 and conditions.CharacterWonBattle(context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Blood_Brother", 8, context)
end
return true
end
return false
end

Theres Dueling Ancillaries


--[[ Ancillary_Duelling_Hidalgo_Fop_2_Trigger ]]--

events.DuelFought[#events.DuelFought+1] =
function (context)
if conditions.CharacterWonDuel(context) and conditions.CharacterDuelWeapon("duelling_sword", context) and conditions.CharacterFactionName("spain", context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Duelling_Hidalgo_Fop", 17, context)
end
return true
end
return false
end

--[[ Ancillary_Duelling_Minx_Trigger ]]--

events.CharacterTurnEnd[#events.CharacterTurnEnd+1] =
function (context)
if (conditions.CharacterType("rake", context) or conditions.CharacterType("gentleman", context)) and conditions.CharacterCultureType("european", context) and (conditions.CharacterTrait("C_Gent_Duelling_Sword", context) >= 2 or conditions.CharacterTrait("C_Gent_Duelling_Pistol", context) >= 4) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Duelling_Minx", 8, context)
end
return true
end
return false
end

--[[ Ancillary_Duelling_Pistols_2_Trigger ]]--

events.DuelFought[#events.DuelFought+1] =
function (context)
if conditions.CharacterWonDuel(context) and conditions.CharacterDuelWeapon("duelling_pistols", context) and not conditions.CharacterFactionName("britain", context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Duelling_Pistols", 17, context)
end
return true
end
return false
end

--[[ Ancillary_Duelling_Pistols_Manton_2_Trigger ]]--

events.DuelFought[#events.DuelFought+1] =
function (context)
if conditions.CharacterWonDuel(context) and conditions.CharacterDuelWeapon("duelling_pistols", context) and conditions.CharacterFactionName("britain", context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Duelling_Pistols_Manton", 5, context)
end
return true
end
return false
end


Theres more Captive Ancillaries


--[[ Ancillary_European_Captive_Ferang_Trigger ]]--

events.CharacterCompletedBattle[#events.CharacterCompletedBattle+1] =
function (context)
if (conditions.CharacterType("General", context) or conditions.CharacterType("admiral", context)) and conditions.CharacterCultureType("indian", context) and conditions.CharacterFoughtCulture("european", context) or (conditions.CharacterInTheatre(836795134, context) or conditions.CharacterInTheatre(-1133129049, context)) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_European_Captive_Ferang", 8, context)
end
return true
end
return false
end


This is probably the most intersting trigger:


--[[ Ancillary_Government_Vampire_Hunter_Trigger ]]--

events.CharacterTurnEnd[#events.CharacterTurnEnd+1] =
function (context)
if conditions.CharacterType("minister", context) and conditions.IsFactionLeader(context) and conditions.CharacterFactionName("austria", context) and conditions.FactionLeadersTrait("C_Personal_Piety", context) >= 1 and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Government_Vampire_Hunter", 8, context)
end
return true
end
return false
end

Till I saw this one:


--[[ Ancillary_Grizzly_Adams_Trigger ]]--

events.CharacterCompletedBattle[#events.CharacterCompletedBattle+1] =
function (context)
if conditions.CharacterType("General", context) and not conditions.CharacterCultureType("tribal", context) and conditions.CharacterWonBattle(context) and conditions.CharacterInTheatre(1, context) and not conditions.CampaignName("episodic_1", context) and not conditions.CampaignName("episodic_3", context) then
if conditions.DateInRange(1700, 1900, context) then
effect.ancillary("Ancillary_Grizzly_Adams", 8, context)
end
return true
end
return false
end

Alexander the Pretty Good
02-23-2009, 15:01
Has anyone tried to take away the scripting in the battle of Brandywine? The naval battle has a template for an "unscripted" scenario, and I was wondering if something similar could be done for the land battle...

Mailman653
02-23-2009, 15:26
Has anyone tried to take away the scripting in the battle of Brandywine? The naval battle has a template for an "unscripted" scenario, and I was wondering if something similar could be done for the land battle...

http://www.twcenter.net/forums/showthread.php?t=228100
Looks like it's been done, I'm gonna give it a try myself.

pevergreen
02-23-2009, 15:39
It has been done.

Check TWC, all the modding progress is being done there. (edit: thats what not refreshing gets me)

Mailman653
02-23-2009, 17:29
Great news! "new map":laugh4:

It's actually the battle tutorial map, heres how,

Open up the brandywine.xml and change the following:

<battle_map_definition>
<name>BattleTerrain/presets/battle_tutorial/</name>
</battle_map_definition>

Change brandy wine to battle_tutorial. Thats it. The only problem is having to guess the unit placement, as it is the Brits spawn behind the town while the US are spread out across the valley.
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-02-2311-46-14-06.jpg

I'm going to try to replace the unit placement #'s with the ones from the tutorial, maybe that will help. Oh, I also made it rain, but it's hardly noticble in the screen shot.

Judge
02-23-2009, 18:37
Rain = wet gunpowder = mellee :thumbsup:

Mailman653
02-23-2009, 18:39
I zipped up the Brandywine-tutorial map for everyone to enjoy, it has the default US and England factions with their Brandywine units, the only change is the map. :yes:

Update: There are some placement issues so I removed the download. As the English you spawn behind the town and can deploy almost anywhere but the Americans spawn partly in front of the town and in the valley below. As the Americans you fix this problem by just moving all your units in front of the town and the English will spawn behind it.

Update1:I've given up for now, I've copy and pasted the positions of the English units from the tutorial to the Americans but there are so many units that most of the army spawns in the valley below. I tried tweaking the #'s for everyone else but now I'm just crashing my game.

Mailman653
02-23-2009, 18:41
Rain = wet gunpowder = mellee :thumbsup:

The Spanish did at one point but I think it was a last ditch effort because after I repelled their charge what was left of their army routed. :2thumbsup:

Update:Alright, this is the file AS IS, I've provided some instructions on how to compensate for the bugged locations, if anyone else wants to try to give them proper spawn locations, go right ahead. :yes:

Backup your files, this will overwrite your orginal brandywine.xml and script!

lenin96
02-25-2009, 09:42
Has anyone seen this (http://radikal.ru/F/s45.radikal.ru/i107/0902/03/dd042d654b67.jpg.html) before?

I saw it at TWC.

pevergreen
02-25-2009, 10:17
Look about 10 posts above yours.

lenin96
02-25-2009, 11:39
Damm I forgot:wall::whip:.

Monsieur Alphonse
02-25-2009, 22:29
Has anyone seen this (http://radikal.ru/F/s45.radikal.ru/i107/0902/03/dd042d654b67.jpg.html) before?

I saw it at TWC.

That is already old news. There is a screenshot of 10,000 men in one unit and someone even tried 15,000 bit that made the game too laggy.

And there is more! Some guy modded the demo so he had more then twenty units he could control. He had only twenty unit cards but he had more then twenty units.

Meneldil
02-26-2009, 06:55
Haha, some of these ancillaries are quite cool :2thumbsup:

lenin96
02-26-2009, 10:08
And there is more! Some guy modded the demo so he had more then twenty units he could control. He had only twenty unit cards but he had more then twenty units.

CA removed more hardcodes than I thought they would.

Eldgrim
02-26-2009, 13:40
Has anyone been able to gain access to the unit models/meshes? I am trying to locate them so i can see the latest poly count and the like of the units but to no avail. Also anyone know where the unit textures are?

pevergreen
02-26-2009, 14:24
pack3.pack

lots of people having trouble unpacking that one.

Eldgrim
02-26-2009, 14:33
pack3.pack

lots of people having trouble unpacking that one.

Oh really? Hrmm... dang that's all i really wanted to access MOD wise at the moment. Has anyone successfully unpacked it once yet?

pevergreen
02-26-2009, 14:37
check TWC.

I think a few people have.

try modifying the command to something along the lines of

emp_unpacker.py -p pack3.pack -u all

that might work, from memory.

Eldgrim
02-26-2009, 14:42
Ah thanks. Though i doubt my ability with coding i'm more of an artist :P So i'm useless with the real work!

Mailman653
02-26-2009, 15:27
I got all of them unpacked, I can't remember the link but its in the TWC forums, someone made a program that unpacks everything, you just have to have the orginal unpacker as a requirement. The flag textures are neat, there are some unique flags that I was able to identify like England Republic or US Monarchy. The uniform textures are a little disappointing because at the moment it seems as if everyone shares the same textures. If you take a look, everyone has white coats with different colored cuffs and turnbacks, yet obviously in the game the English are wearing red for example. I haven't been able to figure out how the game knows who wears what color and how to change it. I hope it's just a demo issue or if it isn't, that modders can still mod the uniforms because it would suck if you change the Line Inf uniform to pink for example and then every country in your game that has Line Inf goes pink.

Eldgrim
02-26-2009, 19:27
I got all of them unpacked, I can't remember the link but its in the TWC forums, someone made a program that unpacks everything, you just have to have the orginal unpacker as a requirement.

Thanks, i eventually found it and now have access to all the unpacked files. Although my current obstacle is finding a program that can open the unit models... as it is not a native to 3DS Max it seems. :(

Mailman653
02-27-2009, 06:26
I'm sure the tools won't be long in comming out considering they will have a day one patch.

Eldgrim
02-27-2009, 10:18
I hope so! My biggest reason for getting the game is MOD'ing it... my PC ain't crash-hot enough to enjoy the game with all the bells and whistles, plus the era it is set in doesn't appeal to me as much as earlier eras.

Mailman653
03-01-2009, 02:39
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-02-2820-32-12-12.jpg
My first texture mod :yes:

The flag for the US monarchy flag is cool, but I think the Grand Union flag is better suited since it was the first US flag and it showed the connection the colonials still felt towards England. What better flag to show homage to their history of monarchy rule than to keep the British flag in the canton?
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-03-0201-33-16-39.jpg
I got the idea from here: http://www.boltonnews.org/colonelsflag.jpg
Since the French apprently didn't carry national colors but instead something called colonel's colors, I figured that flag would be more appropriate.
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-03-0201-35-02-81.jpg
My sig:laugh4:

Mailman653
03-01-2009, 06:50
http://www.twcenter.net/forums/showthread.php?t=228947
Informative post in regards to uniforms
https://i22.photobucket.com/albums/b344/Officerpuppy_/MTW2/Empire2009-03-0100-39-24-76.jpg
The good: Red coat US drummer.
The bad: White coat English drummer.
The ugly:It would seem that the uniform colors are related to the faction color, but I am not fully convinced of this just yet although I have suspected it this when I noticed all the uniforms are white. Everyone shares the glossmap.tga so although I was able to alter it to change the US drummers coat from blue to red, the English drummer went from red to white. I am hopeing this is just a demo issue and not a full game issue or that this information is hard coded somewhere.

pevergreen
03-02-2009, 03:45
I had a feeling that faction colours were just put on general units.

Makes it easier for modders at least? :grin2: (well easier for those who just want to add factions, not new units)

Mailman653
03-02-2009, 04:20
I'm not sure. For instance if I want to make the British artiliery wear blue coats instead of red I can do it but then it would effect every faction that uses that unit cause of that glossmap.tga that's shared. So although I'd have my Brit arty in blue coats, every other faction would have the default white coat on; that's a whole lot of modding just for a blue coat.

I found a thread at the TWC in which someone states that CA said that if France becomes a republic, they will retain the white unifoms instead of going blue. That further reinforces the notion that the uniforms are faction color specific.:shame:

Wausser
03-02-2009, 08:50
I added rank fire, but it doesn't seem to work, do I have to remove


<firing_drill>fire_volley</firing_drill>

this?

Antalis::
03-02-2009, 12:39
@Wausser

It should look like this:

<firing_drill>rank_fire</firing_drill>

Wausser
03-02-2009, 13:44
Yeah I figured out, but I did it like this


<firing_drill>fire_volley</firing_drill>
<firing_drill>rank_fire</firing_drill>

I suppose I have to remove the fire_volley

yankeefan05
03-02-2009, 16:34
I only I knew about this like a week before. O well, thanks for the info.

Alexander the Pretty Good
03-04-2009, 04:53
Yeah Wausser, you have to remove the fire_volley line (that is to say, rank_fire was supposed to replace fire_volley).

Did it run with the 2 lines or just crash?

Rick
03-04-2009, 16:54
Where are they hiding the sounds. And is it possible to replace the existing musket fire sound?

Mailman653
03-05-2009, 00:19
Where are they hiding the sounds. And is it possible to replace the existing musket fire sound?

I think in the demo they had it in pack three or four. I suppose it should be the same for the full game, but I don't know for sure, don't have the game yet. :shame:

pevergreen
03-05-2009, 12:07
Do not attempt to mod things in the full game, it is much more complicated. No one so far has been able to get something working without side effects. Wait for mod tools.

Prussian to the Iron
09-22-2009, 03:19
LOL!

You're asking people, all of us who are still learning our ways around modding E:TW, to just take time out of our schedules to not only learn to create new textures and meshes for the guns, but also new animations and code it in.

I mean, I'm not trying to be mean, but honestly, you don't ask a question this difficult and then ask people to do it for you after 1 post.