25.12.2013, 10:31
25.12.2013, 19:35
Quote:1) When combos equipped, all the slots except one return -1, so it is impossible with erm to get if a slot is empty or part of combo on. For now, my script will exit if a combo is found but will exchange all the other artifacts until that.Solvable, but requires a bit of coding. What's the problem with empty slots?
Quote:2) Moving artifacts by erm does not trigger AE1/0 so we need UN:C to trigger them (example, move magic tomes by erm leaves the spells in book, need to delete, or moving same tome does not give the spells automatically). (see*)If Solitaires code works, it's ok.
Quote:3) when moving backpack artifacts, there is no redraw (oh well...)Even with MoP's code?
Quote:4) When tested in HD, SN: D does not redraw troops.Try MoP's code, maybe it redraws the whole screen.
25.12.2013, 19:50
Will try MoP, until now isn't working. The problem with empty slots is that one artifact will move in a combo place, because it reads -1.
Let's say you have admiral hat, so head slot returns combo on, but neck returns -1 (empty). So if other hero has something on neck and you press to give artifacts, his artifact will install on your neck, but you keep admiral hat too.
You can see that when you hover mouse over combos. Except one slot, mouse says "empty" on all locked slots.
Solitaire code: no idea how to use it. Jim uses it for active hero without specify ID, but in transfer artifacts, there are two heros active. Not working.
@Edit: backpack redraw solved with MoP code.
Let's say you have admiral hat, so head slot returns combo on, but neck returns -1 (empty). So if other hero has something on neck and you press to give artifacts, his artifact will install on your neck, but you keep admiral hat too.
You can see that when you hover mouse over combos. Except one slot, mouse says "empty" on all locked slots.
Solitaire code: no idea how to use it. Jim uses it for active hero without specify ID, but in transfer artifacts, there are two heros active. Not working.
@Edit: backpack redraw solved with MoP code.
25.12.2013, 21:52
Should I write function to check for really free slots on hero doll?
25.12.2013, 22:27
Valery, пожалуйста проводите проверку на AI and TCP/IP для сокращения ошибок и недочетов при сетевой игре
Please perform the test on AI and TCP / IP in order to reduce errors and defects in multiplayer
Например "Swap troops"
P.S. sorry for my bad english
Please perform the test on AI and TCP / IP in order to reduce errors and defects in multiplayer
Например "Swap troops"
P.S. sorry for my bad english

26.12.2013, 02:07
Igrik, I know almost nothing about multiplayer, if you want to finalize you are welcome. I can't even play online. If you can test it, modify what you need then paste here so I can update, ok?
Reworked a bit the thing and uploaded here:
Improved_backpack
Changes:
*updated with igrik last backpack bag
*added mop code
*optimized switch artifacts
The problems remaining (in single player at least) are related to switch artifacts. The biggest problem I faced is due to the fact that, when you erm-remove one equipped artifact, you must remove ALL that artifacts ID the hero owns, with A-$. If you don't do so, the stats bonuses do not change.
The second problem are the combos, the combo ID location returns fine, but the locked slots return -1, as it was empty. So far, I am unable to exchange properly combos, without having their locked slots get other artifacts in.
The third problem are the misc.slots 1-5, I don't know how to do them properly. Again, we must remove all artifacts on switching, so if one hero has for example 5 purses of gold in slots 9-12/18, when you process 9, it will delete all purses and give back 4 in backpack. So the script will not find anymore purses in slot 10-12/18. You will not have error in artifacts counter, but the ones you had equipped will be now in backpack, so have to equip again manually, annoying. I disabled misc slots from script, waiting for someone to have a genius idea.
One solution would be to store ALL artifacts one hero has equipped in global vars but we would need 28 then and I want to avoid that, to keep compatibility with everything. But still with that, the combos thing will not be solved.
Here is the code for exchanging artifacts, if someone wants to finalize, would be great.
Reworked a bit the thing and uploaded here:
Improved_backpack
Changes:
*updated with igrik last backpack bag
*added mop code
*optimized switch artifacts
The problems remaining (in single player at least) are related to switch artifacts. The biggest problem I faced is due to the fact that, when you erm-remove one equipped artifact, you must remove ALL that artifacts ID the hero owns, with A-$. If you don't do so, the stats bonuses do not change.
The second problem are the combos, the combo ID location returns fine, but the locked slots return -1, as it was empty. So far, I am unable to exchange properly combos, without having their locked slots get other artifacts in.
The third problem are the misc.slots 1-5, I don't know how to do them properly. Again, we must remove all artifacts on switching, so if one hero has for example 5 purses of gold in slots 9-12/18, when you process 9, it will delete all purses and give back 4 in backpack. So the script will not find anymore purses in slot 10-12/18. You will not have error in artifacts counter, but the ones you had equipped will be now in backpack, so have to equip again manually, annoying. I disabled misc slots from script, waiting for someone to have a genius idea.
One solution would be to store ALL artifacts one hero has equipped in global vars but we would need 28 then and I want to avoid that, to keep compatibility with everything. But still with that, the combos thing will not be solved.
Here is the code for exchanging artifacts, if someone wants to finalize, would be great.
26.12.2013, 09:18
Updated to same link. Made buttons for backpack switch, redid all the codes for artifacts transfer. The problems remaining I can not solve so I am over.
Remaining:
1) Combos are skipped, because ghost locked slots. If you delete the two lines preventing the combos, you will see what I mean.
2) If hero has >3 equipped artifacts of same type (ie: purse of gold), only 3 of them will be switched/given, the others will remain equipped. This is because at each switch we have to delete all artifacts, re-equip the extra so other slots are used. Not perfect but that's it.
Code for switch:
Remaining:
1) Combos are skipped, because ghost locked slots. If you delete the two lines preventing the combos, you will see what I mean.
2) If hero has >3 equipped artifacts of same type (ie: purse of gold), only 3 of them will be switched/given, the others will remain equipped. This is because at each switch we have to delete all artifacts, re-equip the extra so other slots are used. Not perfect but that's it.
Code for switch:
26.12.2013, 12:39
update script for multiplayer.
26.12.2013, 14:49
Thanks, Download.
Updated link. I changed flag 116 to SN:W vars as there are many mods using low flags.
Just one question, why the Multiplayer fix? So far AI never uses click so never gonna happen, do I miss something?
PS: in the version you have, I forgot a test line in switch artifacts:
Delete it.
Updated link. I changed flag 116 to SN:W vars as there are many mods using low flags.
Just one question, why the Multiplayer fix? So far AI never uses click so never gonna happen, do I miss something?
PS: in the version you have, I forgot a test line in switch artifacts:
Delete it.
26.12.2013, 15:48
(25.12.2013 21:52)Berserker Wrote: [ -> ]Should I write function to check for really free slots on hero doll?
Would be very useful for this mod, yes.

26.12.2013, 15:57
Not to allow a player to take a human troops and artifacts from AI. Human in original can not pick the same troops and artifacts from AI
(26.12.2013 14:49)Valery Wrote: [ -> ] Delete it.Thanks.
26.12.2013, 15:59
Ah right, I forgot that, my bad.
26.12.2013, 16:05
Valery, there were still checks in these places !?CM3
upd: already saw. my mistake
upd: already saw. my mistake
26.12.2013, 16:11
I changed everywhere (I hope!) 

28.12.2013, 10:16
DOWNLOAD HsM
New link and name. Solved all issues, thank Bersy.
Remaining (visual only) problem: when HD mod and move/switch armies, screen quickly flashes for half second when using MoP redraw. In regular definition all ok.
New link and name. Solved all issues, thank Bersy.
Remaining (visual only) problem: when HD mod and move/switch armies, screen quickly flashes for half second when using MoP redraw. In regular definition all ok.