|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 23, 2012 08:56 PM |
|
|
I think that installing on desktop a shotcut to mods manager would be better than any tutorial. Once the player understands how it works, he can delete it.
____________
Era II mods and utilities
|
|
Airwave
Tavern Dweller
|
posted April 24, 2012 12:19 AM |
|
|
Running Era in Wine
I don't know if this is the appropriate place to ask, but I'm wondering if anyone has gotten Era II to work in Wine. Installing and running Heroes III Complete was no problem. When I run the Era installer, it unpacks everything just fine, albeit slowly, but after unpacking it doesn't automatically run the .bat like when installing on Windows. When I try to run the .bat manually, it completes some of the commands successfully, but gives error messages for others. Running h3era.exe afterwards fails with an error (I don't have it at the moment, but could get it if needed). Running on Fedora 16 x64 by the way. I would love to hear from others who have also tried getting it to work in Wine.
|
|
Bersy
Honorable
Supreme Hero
|
posted April 24, 2012 11:03 AM |
|
|
As far as I know, wine cannot run it. WoG 3.58f integrates with the executable file, while Era and custom plugins base on Win32 peculiarities.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted April 24, 2012 06:04 PM |
|
Edited by majaczek at 00:45, 25 Apr 2012.
|
@WINE
It should be able to work, but nobody yet tried it succesful.
Most of "kernel32.dll pecularities" is already handled by wine's replacement for kernel32.dll. Although some "unsafe" techniques used in ERA executable may be unacceptable for your kernel (kernel says "you shouldn't be able access this memory from here" and application ends with segfault).
Neverthless there are some trivial problems to resolve - some commands from bat script weren't succesful - you should prepare sh equivalent to install ERA properly (or somebody may want do it for you), as my diagnose is some parts of instalation which are just executng the bat script just wasn't done as it should, and your game just cannot start because it isn't fully installed. You can check it out by just installing ERA on virtual machine with some old or trial windows version, then copy it as is to your WINE enviroment - if this works, there's nothing left on ERA side for Bersy to correct - only the installer is incompatible. If somebody would write the sh scripts to replace functionality of bat scripts I probably may try to prepare ERA installer for wine (or perhaps the original one should avoid some commands and have it replaced by another doing the same - or it is just enough to place command.com and some binaries under the WINE enviroment for installer to work as is).
EDIT: I heard there's paid version of WINE or DarWINE that is more compatible with windows applications than free version (I don't know full technicalies). So if somebody want linux and playing games, and know that producers favorise windows enviroment, perhaps he/she could try something like this? I'm still ignorant on wine since I have free windows from MSDNAA, and my phone despite having linux is obviously not i386 architecture .
|
|
Airwave
Tavern Dweller
|
posted April 25, 2012 01:21 AM |
|
|
Quote: Neverthless there are some trivial problems to resolve - some commands from bat script weren't succesful - you should prepare sh equivalent to install ERA properly (or somebody may want do it for you), as my diagnose is some parts of instalation which are just executng the bat script just wasn't done as it should, and your game just cannot start because it isn't fully installed.
I can do that; my shell scripting skills should be up to par for the task, as the script is fairly noncomplex.
Quote: You can check it out by just installing ERA on virtual machine with some old or trial windows version, then copy it as is to your WINE enviroment
I can't believe I didn't think of this. Very silly of me.
I tried doing it just now, and I'm afraid h3era.exe is still unable to start in Wine. This time I had the foresight to actually copy the error message, however:
Quote: wine: Unhandled page fault on read access to 0x0384c378 at address 0x0055:0x035c3b8e (thread 0009), starting debugger...
Quote: EDIT: I heard there's paid version of WINE or DarWINE that is more compatible with windows applications than free version (I don't know full technicalies).
My (somewhat limited) knowledge of the topic is that Cedega and CrossOver are the two proprietary Wine derivatives right now, and they actually contribute a lot of the code they write back to Wine. Usually they focus their development efforts on getting big-name games to run properly. I don't think it would make any difference in this case.
Thanks so much for the help. I will report back with the shell script once I finish writing it.
|
|
Airwave
Tavern Dweller
|
posted April 25, 2012 02:25 AM |
|
Edited by Airwave at 10:19, 25 Apr 2012.
|
One out of two Wine problems has been solved:
[url]http://pastebin.com/Qkpp70fT[/url]
The script is an sh-version of _Install_/install.bat from Era II. It is expected to be located in the _Install_ folder as well, and needs to have execute permissions to run. The only part of the original script not implemented is the opening of the HTML readme files, as there is no standard desktop environment agnostic way of opening files in the default browser. Right now it's just two commented out lines that open the HTML files in Firefox. Also worth noting is that file and directory names are case sensitive in GNU/Linux, so if any of the names don't match because of case, please let me know so I can fix it. The only one I had on my installation (GOG.com) was the folder "ONLINE", which was uppercase.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted April 25, 2012 03:30 PM |
|
|
@Airwave
The page fault is because hackish techniques used in ERA. In windows they just work, in linux kernel checks the code, and claiming it is unsafe kills the program and prints the error. There are two ways to solve this without bothering Bersy (and each plugin authors):
1) just use virtual machine with windows (windows 98 should be enough) and play on the virtual machine.
2) run ERA with additional memory priviledges. this may require modified/custom kernel and/or important changes to WINE config/code. Having the checkout disabled in kernel open vulnerabilities so it still should be run inside virtual machine or kexec. I don't think opening ways of code manipulation in wine open any serious vulnerabilities, but I suggest a separate copy of wine for this purporse. Please read much about wine, as it is possible that only tweaking wine is enough since the error message isn't standard segfault message (so I diagnose source to be in WINE not the kernel).
@Bersy
Is the "more spells" capability from "WoG 3.59 alfa for Sagamosa" availible in ERA? If not Should it be hard to implement it as ERA plugin basing on WoG sources?
and about Towns fiddling. Some person claimed the code works yet poorly when adding new town, but I'm curious if the code is able to make stable modifications to existing towns. So for example more buildings in same town, having copy of one of original buildings in another town, changing mage guild levels count, etc. It would be nice to have second upgrade buildings as normal buildings and not fiddle with additional dialogs to be able to build script-only buildings - and of course new building animation would be on town preview. I would definately would use it in new mod which would supply more creatures (fiddling with dialogs is still the way either). The buildings would be mostly upgrades of existing ones (for example a building which upgrade 7th tier creatures to 8 ones from WoG), and there's interesting to add university/artifact_merchant/etc. to more towns. I'm also curious about Summon Portal, or more precisely an ability to have eighth creature generator in town.
PS: Do I miss any of these already used in TPM by MoP?
|
|
solitaire345
Promising
Famous Hero
|
posted April 25, 2012 05:57 PM |
|
|
Is the "more spells" capability from "WoG 3.59 alfa for Sagamosa" availible in ERA? If not Should it be hard to implement it as ERA plugin basing on WoG sources?
You mean these spells that can be customised with !!SS receiver? Yes, they are available in ERA. The only example I remember is Sagamosa's advanced levels script.
Some person claimed the code works yet poorly when adding new town, but I'm curious if the code is able to make stable modifications to existing towns. So for example more buildings in same town
I guess it was I who claimed that..
Internal structure of HoMM III supports up to 64 buildings. 44 are currently used so there's still space for 20 more, but there are several checks for that in original code which change building ID to -1 (no building) if ID is over 44 and not load anything. Also three or four tables need to be expanded because they are arrays in form of [9][44] and accessing new building values causes IDs of other town being read and leads to crashes when trying to create two objects with same ID or loading a DEF that was dummied out and not included in LOD. Also routines that read values from tables need to be adjusted a little. Possible to do, but needs a lot of testing of various cases. I can try to gather the addresses related to town buildings.
changing mage guild levels count
it is possible to do. Mage guild IDs are first five bits of any town structure so creating a def, adding it's ID to Z-order table and setting 'built' bit with ERM could work okay.
and of course new building animation would be on town preview
Modification of town building Z-order table needed. (a table of char[9][44] at 0x642EC4)
and there's interesting to add university/artifact_merchant/etc. to more towns.
Just call appropriate function on mouse click on particular object ID.
I'm also curious about Summon Portal, or more precisely an ability to have eighth creature generator in town.
Probably possible, but modification of function to create castle window is needed because the screen with 8 slots would appear only if town is dungeon and portal is built.
____________
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted April 25, 2012 06:57 PM |
|
|
Solitaire thanks! And sorry for not beeing able to remember your name
It would be very nice of you trying to help me with adresses, so thanks for the proposition. I guess many things would left for me to implement, but any code/data donation is welcome as long as I don't have to pay for it (yeah it's ERA - bless the ERA of heroes - and bless the ERA Big Persons including Bersy and Solitaire).
I already thought adding 7 standard buildings as upgrades of dwellings, one standard building for upgrade of castle ("Leader's Headquaters" which would add Special Castle Defenders to Siege Battlefield via ERM), one standard upgrade for Resource Silo (to produce 3 mithril each week - if there already would be a blank building - it's easy to implement via ERM) So there is 11 more places for unique buildings - looks like nice way to spice up existing 9 Nations.
Also I remember that unique objects already in towns share the Building IDs so I'm curious if some of new buildings is able to clone behaviour of existing unique buildings.
|
|
solitaire345
Promising
Famous Hero
|
posted April 25, 2012 08:24 PM |
|
|
That's all I have in my disassembly about towns:
.data:00643074 ; char *TableTownBuildingDefNames[9][44]
.data:0068A3DC ; char *TableTownBuildingHotspots[9][44] (a table of pointers to pcx files with hotspot areas)
.rdata:00642EC4 ; char TableTownBuildingZOrder[9][44] (order in which defs are placed during town loading from back to front)
.data:0068AA0E ; __int16 TableTownBuildingcoords[8][44][3] (table of positions of buildings. Each building has three values associated: x_position, y_position, number of frames. For some reason number of frames for upg.pyre is not present and pcx name for that building starts there.)
.data:006A8344 TableTownBuildingsTxt (data from buildings.txt is placed here during initialization)
.data:006A543C TableTownPBldgSpec (data from bldgspec.txt is placed here during init.)
There are several checks for town building numbers, but I can't find their addresses now. Just see what code references above tables and search surrounding code for comparisons with 44 (0x2d) ) The list of tables is probably not 100% complete.
____________
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted April 25, 2012 10:30 PM |
|
Edited by majaczek at 21:45, 30 Apr 2012.
|
Okay thanks.
So these tables have to be relocated to be able to contain 64 not 44 elements per town. I have to change all references to these tables ;( (so I hope only changing adress constants in rest of code is enough). You already stated I have to change all these checks for 44 (It would be similairly easy/hard as work on 99 limit for Primary skills). Then I probably need to do something with function that reads buildings.txt (to be able to use longer buildings.txt and not having to put this data independently of the txt file) - but perhaps it is not much to change in the reading txt function.
Also it seems it's frequently more We than I/Me, and more frequently We having not much of Me. I'm thankful for all that help, and I hope I would once manage to do the rest which is left for me.
So Thanks Again!
EDIT: I done research on the commander codes I get from Bersy. First I changed all to 255 - game crashed - later I checked it was because one of low codes change the commander def - excellent I can change this! (funny were to have cavalier commander ). Then I checked with all ranges disabled (low numbers as oryginal, high ones lower than low ones), and most of stack experience works (the window on properties is SE one, some abilities like summons still doesn't work, but some like spell after/before attack work properly). All commander specialities work on "all disabled" mode, but animation for Tower commander weren't shown. Most of commander abilities work in this mode (I can always disable some temporary via script), some not (so I have to find codes which support them and re-enable). Most of rest codes are responsive for displaying info on commander summary (the ability letters, some other things). Some codes affect some base parameters (like Spell Resistance etc.), but most of the base parameters works exactly same for "all disabled" mode (since they are just basic creature params) - I have to check if they work again after changing starting commander unit number). I'm mostly happy on how it works - still some SE abilities doesn't work, but almost all mechanics I wanted to stay works even in "all disabled" mode. I still want to get some numbers out (I have to check most of codes one by one) to keep the informative description etc. It seems regenmeration doesn't work in "all disabled" but it may be animation only. I haven't yet checked if any of constaants affect the commander artifacts. I seem to be happy with just BIN file (the script version would require much more to write). I need to check if the commander code for starting commander works well with Amethyst (that is if it use new table or old one). It seems tedious to check the existing 50 high number codes even if I know the adresses of them (so only 50 places to check), so I imagine a bit how tedious all Reverse Engineering is (but still finding some adress for some data which nobody before knows may be amusing a bit - is it Bersy?). Greatly thanks for all people which helped on reversing any part of Heroes3 engine.
|
|
NewcomerNew
Tavern Dweller
|
posted April 30, 2012 05:38 PM |
|
|
I tryed the mod under Win98 and h3era.exe fails to start, while under WinXP all work perfectly. Is it WinXP+ only, or may be I missed something? May it be somehow started under Win98, which is very important for me? Otherwise please specify somewhere system requirenments, as SoD works perfectly under Win98.
|
|
Bersy
Honorable
Supreme Hero
|
posted April 30, 2012 05:55 PM |
|
Edited by Bersy at 17:59, 30 Apr 2012.
|
You are right. Only Windows XP+ systems are supported. I will mention it in the next release.
About Wine. I was not able to run Era even with DEP being on after rewriting memory allocation procedure for API bridges. So far I see no safe and cross-platform mechanism to force the code to understand mods system on low level except intercepting kernel/user32 functions.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted April 30, 2012 09:54 PM |
|
|
Bersy, have you seen my EDIT on previous post? If yes please comment it a bit (unless you see there's nothing to comment).
Could I get some adresses for other constant limits on Commaders? Especially finding a way for Commander 6 primary abilities (plus one hidden) to exceed Grandmaster (it seems to be "5" or "6" value of constant, but it still may require additional code for having values for higher levels something meaningful) and a way to disable "only 4 Primary skills availble to increase until having more than 4 at least basic" feature (so you always would be able to increase one until maxed or some of them is on limit depending on that other skills are low).
Vivat ERA !!!
|
|
Bersy
Honorable
Supreme Hero
|
posted May 01, 2012 10:50 AM |
|
|
majaczek, I'm sorry, but you will have to dig it and make research yourself. Just open npc.cpp (npc.h).
For instance:
int NPC::AISkillsChance[18][6]={
{5,15,20,5,35,20}, //Knight.......MP(35%); HP(20%); SP(20%); DF(15%); DM(5%) ; AT(5%)
{13,35,5,20,7,20}, //Cleric.......DF(35%); SP(20%); DM(20%); AT(13%); MP(7%) ; HP(5%)
{13,5,20,20,35,7}, //Ranger.......MP(35%); HP(20%); DM(20%); AT(13%); SP(7%) ; DF(5%)
{35,13,7,20,5,20}, //Druid........AT(35%); DM(20%); SP(20%); DF(13%); HP(7%) ; MP(5%)
{10,5,20,20,15,30},//Alchemist....SP(30%); DM(20%); HP(20%); MP(15%); AT(10%); DF(5%)
{30,15,35,10,5,5}, //Wizard.......HP(35%); AT(30%); DF(15%); DM(10%); SP(5%) ; MP(5%)
//------EVIL classes:
{20,13,5,35,7,20}, //Demoniac.....DM(35%); AT(20%); SP(20%); DF(13%); MP(7%) ; HP(5%)
{10,15,30,20,5,20},//Heretic......HP(30%); DM(20%); SP(20%); DF(15%); AT(10%); MP(5%)
{15,10,10,5,20,40},//Death Knight.SP(40%); MP(20%); AT(15%); DF(10%); HP(10%); DM(5%)
{5,10,15,20,10,40},//Necromancer..SP(40%); DM(20%); HP(15%); DF(10%); MP(10%); AT(5%)
{5,9,30,18,25,13}, //Overlord.....HP(30%); MP(25%); DM(18%); SP(13%); DF(9%) ; AT(5%)
{20,5,20,30,10,15},//Warlock......DM(30%); HP(20%); AT(20%); SP(15%); MP(10%); DF(5%)
//------NEUTRAL classes:
{5,25,5,5,25,35}, //Barbarian....SP(35%); DF(25%); MP(25%); AT(5%) ; HP(5%) ; DM(5%)
{20,15,10,5,30,20},//Battle Mage..MP(30%); SP(20%); AT(20%); DF(15%); HP(10%); DM(5%)
{35,5,15,5,10,30}, //Beastmaster..AT(35%); SP(30%); HP(15%); MP(10%); DM(5%) ; DF(5%)
{35,30,5,5,10,15}, //Witch........AT(35%); DF(30%); SP(15%); MP(10%); HP(5%) ; DM(5%)
{15,10,20,30,5,20},//Planeswalker.DM(30%); HP(20%); SP(20%); AT(15%); DF(10%); MP(5%)
{30,20,20,15,5,10} //Elementalist.AT(30%); DF(20%); HP(20%); DM(15%); SP(10%); MP(5%)
};
char *NPC::BonusBmp[6][6]={
{ ".\\DATA\\ZVS\\LIB1.RES\\_ATNO.BMP",".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P0.BMP",
".\\DATA\\ZVS\\LIB1.RES\\_SP1.BMP",".\\DATA\\ZVS\\LIB1.RES\\_SP2.BMP",
".\\DATA\\ZVS\\LIB1.RES\\_SP3.BMP",".\\DATA\\ZVS\\LIB1.RES\\_SP4.BMP"}
};
Without arrays redirection changing constants mostly will crash the game.
|
|
Warmonger
Promising
Legendary Hero
fallen artist
|
posted May 01, 2012 10:58 AM |
|
|
|
NewcomerNew
Tavern Dweller
|
posted May 01, 2012 12:30 PM |
|
|
Quote: You are right. Only Windows XP+ systems are supported. I will mention it in the next release.
Ok, thank you. Probably it's time to upgrade OS.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted May 01, 2012 03:01 PM |
|
|
Okay, anyway thanks. Now I see these are tables not the algorithm with %i which surely need moving these to fit the place. Once I would be ready to write such plugins I would make some use of it - would it be better to patch exisitng commander support in TE/ERA or just disable it and replace it with fully open-source approach based on WoG sources?
I am always thankful for any your help. I understand your decision and don't want to steal your time - I just guessed it's something easy and I failed - and just information of failed guess is valuable. But why you didn't comment more on my successes and faults? I just want to know your opinion on this however rough it would be, once it would be fair. I'll then use it as motivation to improve this way of modding or change modding area. I need a bit opinions on my work since I can't get it from fans/players until I provide complete/alfa version of my mod.
Sorry for wall of text, despite of how it looks, I really apreciate you guys (any females on the scene ?).
|
|
Bersy
Honorable
Supreme Hero
|
posted May 01, 2012 03:43 PM |
|
|
Quote: Once I would be ready to write such plugins I would make some use of it - would it be better to patch exisitng commander support in TE/ERA or just disable it and replace it with fully open-source approach based on WoG sources?
In my humble opinion, it's not so hard to write new commanders system using DL-dialogs (!!DL). You will be able to use any layout, defs, pcx and text controls. What concerns commanders abilities in battles...I wanted to make most of in-game abilities accessible for all creatures one day, as it is already done in MoP (not released to public, of course). It means seeking for every monster number check (like: CMP EAX, LORD_VAMPIRE) and replacing it with a hook looking at global table for all 0..255 monsters and additional 0..42 battle stacks. Currently it's only ideas, so you should rely on yourself only.
Quote: But why you didn't comment more on my successes and faults?
I think you are to train with assembler and ollydebugger. Ones you try, you won't need me or anybody else, will become arrogant and self-maintainable )) Still I read most of your posts and find them rather reasonable except Hota's topic, which provokes flame and has a destructive, not constructive effect on both you, me, H3 community. Some people don't show their code, use public tools but don't share their sources. That is their decision, let them use the power of free will If you meet any troubles while writing simple plugins, let me know.
|
|
NewcomerNew
Tavern Dweller
|
posted May 01, 2012 04:02 PM |
|
|
Sorry for offtopic, is it a way to stop email notifications from this topic (yes, there is a way to stop all email notifications, but I am looking a way to stop notifications just for a one topic)? Can't find a way, and no FAQ entry for this.
|
|
|
|