Author Topic: Nerd's Corner  (Read 169492 times)

Online Szwagier

  • Ogre Mage
  • ********
  • Posts: 1787
    • View Profile
Re: Nerd's Corner
« Reply #120 on: February 13, 2018, 05:00:44 PM »
ok i tried discover where is mission objective
when i copied first mission from DP  xhum01 and saved as xhum02 i could kill alleria and turyalon, i couldnt kill danath
if i copied first mission human1 from TD and saved as xhum01 i got lose after 5 sec. SO mission objective are not in map
but
when i moved first mission human1 and played in scenario i wont win when i kill enemy units i will win when i made 4 farms and 1 rax so this is in map 
http://www.youtube.com/@War2Multiplayer


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline Delete mine too

  • Death Knight
  • *********
  • Posts: 2652
  • http://meatspin.com
    • View Profile
    • http://meatspin.com
Re: Nerd's Corner
« Reply #121 on: February 13, 2018, 06:28:32 PM »
ok i tried discover where is mission objective
when i copied first mission from DP  xhum01 and saved as xhum02 i could kill alleria and turyalon, i couldnt kill danath
if i copied first mission human1 from TD and saved as xhum01 i got lose after 5 sec. SO mission objective are not in map
but
when i moved first mission human1 and played in scenario i wont win when i kill enemy units i will win when i made 4 farms and 1 rax so this is in map 
It's hardcoded in the exe I made a thread about this over a year ago. For people to have different missions or objectives they would need to run a program or everyone downloads a patched war2.exe...

Online Szwagier

  • Ogre Mage
  • ********
  • Posts: 1787
    • View Profile
Re: Nerd's Corner
« Reply #122 on: February 14, 2018, 01:55:19 AM »
ok i tried discover where is mission objective
when i copied first mission from DP  xhum01 and saved as xhum02 i could kill alleria and turyalon, i couldnt kill danath
if i copied first mission human1 from TD and saved as xhum01 i got lose after 5 sec. SO mission objective are not in map
but
when i moved first mission human1 and played in scenario i wont win when i kill enemy units i will win when i made 4 farms and 1 rax so this is in map 
It's hardcoded in the exe I made a thread about this over a year ago. For people to have different missions or objectives they would need to run a program or everyone downloads a patched war2.exe...

Yes i remember but question is why mission 1 is working in scenario also
http://www.youtube.com/@War2Multiplayer


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: Nerd's Corner
« Reply #123 on: February 14, 2018, 05:48:05 AM »
it would be great if we could find them....destroy the dark portal ends game, would make it for a fun custom.

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: Nerd's Corner
« Reply #124 on: February 14, 2018, 06:37:19 AM »
when i moved first mission human1 and played in scenario i wont win when i kill enemy units i will win when i made 4 farms and 1 rax so this is in map

Interesting.

How are you playing it "in scenario"? You are converting it to a .PUD file? or a game save? ...or?
its gooder to hax hard and NEVER get caught!

Online Szwagier

  • Ogre Mage
  • ********
  • Posts: 1787
    • View Profile
Re: Nerd's Corner
« Reply #125 on: February 14, 2018, 07:15:10 AM »
All Maps from camping are Saved as pus

Pud file as normalnie map Saved human01. Pud like gardenofwar. Pud


OK now i know what happen i made farm rescue(passive) , if i wont acctive it, it means its opponent, if I destroy it with range (archers,cata etc) without touch it i will win


http://forum.war2.ru/index.php/topic,1956.0.html

It is possible to change? for example make 6 farms not 4?
anyway i tried with cheat enigne and i could change only res
« Last Edit: February 14, 2018, 01:44:09 PM by Szwagier »
http://www.youtube.com/@War2Multiplayer


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: Nerd's Corner
« Reply #126 on: February 14, 2018, 04:40:20 PM »
im sure it is,ill try also

Online Szwagier

  • Ogre Mage
  • ********
  • Posts: 1787
    • View Profile
Re: Nerd's Corner
« Reply #127 on: February 14, 2018, 04:56:22 PM »
if it will work make also  tutorial how to do it ^^ I know only that if u need go to circle of power you can do it with every units(footman knight etc even if there is mission objective  is  archer)
http://www.youtube.com/@War2Multiplayer


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline Delete mine too

  • Death Knight
  • *********
  • Posts: 2652
  • http://meatspin.com
    • View Profile
    • http://meatspin.com
Re: Nerd's Corner
« Reply #128 on: February 14, 2018, 06:22:04 PM »
All Maps from camping are Saved as pus

Pud file as normalnie map Saved human01. Pud like gardenofwar. Pud


OK now i know what happen i made farm rescue(passive) , if i wont acctive it, it means its opponent, if I destroy it with range (archers,cata etc) without touch it i will win


http://forum.war2.ru/index.php/topic,1956.0.html

It is possible to change? for example make 6 farms not 4?
anyway i tried with cheat enigne and i could change only res

Yes, you could do that but I think it would be a pain IN the ass to locate that offset. Look for a map that has more objectives in common, like build 1 shipyard, etc... the more you can change the better you can search.

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: Nerd's Corner
« Reply #129 on: February 14, 2018, 10:29:20 PM »
oh well i mis read ..i thought you was talking about farm food value

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: Nerd's Corner
« Reply #130 on: February 15, 2018, 02:03:57 AM »

It is possible to change? for example make 6 farms not 4?
anyway i tried with cheat enigne and i could change only res
Yes, you could do that but I think it would be a pain IN the ass to locate that offset. Look for a map that has more objectives in common, like build 1 shipyard, etc... the more you can change the better you can search.

As an exe mod, yes. I dont think this is part of  the PUD file though, althought perhaps there is a single value somewhere in the PUD that designates one of the pre-defined sets of victory conditions. I don't think so, but that would be nice.
its gooder to hax hard and NEVER get caught!

Online Szwagier

  • Ogre Mage
  • ********
  • Posts: 1787
    • View Profile
Re: Nerd's Corner
« Reply #131 on: February 15, 2018, 02:33:41 AM »
Yes its in exe, but how do that cause u need Save exe with New value, i tired to do it but w2 didnt turn on
http://www.youtube.com/@War2Multiplayer


Equinox - the dumbest person in this game, do not argue with an idiot, because he will bring you to his level and overcome with experience

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: Nerd's Corner
« Reply #132 on: February 15, 2018, 10:36:55 AM »
Yes its in exe, but how do that cause u need Save exe with New value, i tired to do it but w2 didnt turn on

Ahh. Well it depends.

You can mod the process once the exe has been loaded.... or you can mod the exe file... BUT you can only mod the exe file if the value is in an initialized section. Virtual sections (uninitialised data) do not exist in the exe file so can only be modded in memory.

The offests in the exe file can be calculated from the values in the PE header. i.e. mem address - (ImageBase+VirtualAddress) + PointerToRawData = file address (IIRC something like that lol).

ImageBase is in the IMAGE_OPTIONAL_HEADER, and PointerToRawData, VirtualAddress are in the IMAGE_SECTION_HEADER for the relevant section. You will have to check the Characteristics to make sure the section isn't flagged as UNINITIALIZED.

its gooder to hax hard and NEVER get caught!

Offline Lambchops

  • Ogre Mage
  • ********
  • Posts: 1541
    • View Profile
Re: Nerd's Corner
« Reply #133 on: February 15, 2018, 10:58:54 PM »
00 00 00 00 00 00 00 00 90 24 44 00 F0 25 44 00 00 00 00 00 A0 26 44 00 D0 28 44 00 80 29 44 00 E0 29 44 00 90 2A 44 00 20 2B 44 00 E0 2B 44 00 60 2C 44 00 F0 2C 44 00 80 2D 44 00 90 2E 44 00 C0 32 44 00 30 33 44 00 E0 33 44 00 80 34 44 00  u see them mem address the exe tells you swithc them up

well for example the first one 0x00442490
its an address in the .text section = code (instructions)

heres a dump of the WC2 PE header info:

Spoiler

so the first thing is the ImageBase which is in the IMAGE_OPTIONAL_HEADER (which is very non-optional BTW)

the image base is 0x00400000, which is the default  for exe file so that's easy.

so we subtract that from the address ad we get 0x00042490
This is now a virtual address (aka VA) because it is an relative to the image base.

so looking through the IMAGE_SECTION_HEADERs we can see that the .text section has:
  VirtualSize                      0x0008E2EE
  VirtualAddress                0x00001000

which means it will be 0x00401000 -> 0x0048F2EE in memory ...

but anyway we can see that  1000 < 42490 < (1000+8E2EE)  so we know it's in this section.

so then we subtract the VirtualAddress 42490-1000 = 41490
this is the offset into the .text section for our address.

So then we just have to know where the text section is in the exe file, that is PointerToRawData

In this case Pointer to raw data is also 0x1000, same as virtual address so we just add 1000 back again and we get 42490 as the exe file offset.

This example is very easy because VirtualAddress=PointerToRawData.

If we wanted an address in the .rsrc section it would be different:

e.g.  0x004DA666
we have:
    ImageBase           =0x00400000
    VirtualAddress     =0x000D9000
    PointerToRawData =0x000AC000

so:
0x004DA666 - 0x00400000 - 0x000D9000 + 0x000AC000 = 0x000AD666 (exe file offset)

----------================-------------


END RESULT.... for all those ones in your mem dump there just remove the first '4' ;)

0x00442490 mem = 0x00042490 file

... but it's not always like that.


its gooder to hax hard and NEVER get caught!

Offline shesycompany

  • Death Knight
  • *********
  • Posts: 3587
  • retired, be in music section
    • View Profile
Re: Nerd's Corner
« Reply #134 on: February 16, 2018, 09:53:21 AM »
nice info lamb!