writeField Function (adding and editing PT fields)

UPDATE:


1.17.6
- fixed problem with placing NPC on field
- names of old pre AoR fields have old_ prefix


1.17.6

Pre AoR fields:
new fixed names with prefix old_



You need to delete your old pre AoR fields files and copy those from download to both server and client.
To add NPC to "old_" field you need to add "old_" prefix to your .ase, .spm and .spp files in GameServer\Field\ folder.
Also recompile .dll's and place then in server and client folders.

Thanks gzuz for reporting bug.
 
I took "refresh" as "clean and rebuild all" :/:
 
If you are using CFF Explorer to add .dll to client than remove .dll from .exe, save changes and add it again. Also ASM CALL writeClientField once again. Address sometimes change when size/structure of .dll change.

When i press ctrl + R i don't see the CALL...

Vormav - writeField Function (adding and editing PT fields) - RaGEZONE Forums


This game.exe has writeField, but i want update it and i can't..

@EDIT
With a new game.exe worked, but i want use this game.exe ... Can anyone help me ?

This new game.exe doesn't have writeField and i can add the writeField
 
Last edited:
Actually, that's a lot of why I said you should always use the CALL to address pointed to by game.exe import address table pointer. It's not easy, because that is a much larger instruction, but even if you place your CALL in the internal (game.exe) function, it's better than CALLing directly into a DLL which may be loaded (because it *is* loaded "dynamically") at a completely different address, if the executive loader decides that it's preferred address is not free in this processes "flat" address space.
 
@HappyJJ

1* You don't see your old call because your new call pointing to function in .dll, check your address in unmodified .exe
2* When you are removing .dll from .exe press press rebuild import table, when you are adding .dll be sure that create new section in selected and also press rebuild import table.
 
using unmodified.exe's address...

Game.exe
Code:
0043ABB0    $  53                                  PUSH EBX                                  ;  kernel32.7716500E
0043ABB1    .  33DB                                XOR EBX,EBX                               ;  kernel32.7716500E
0043ABB3    .  881D 18CE8D00                       MOV BYTE PTR DS:[8DCE18],BL
0043ABB9    .  881D 58CE8D00                       MOV BYTE PTR DS:[8DCE58],BL
0043ABBF    .  E8 9C850000                         CALL games.00443160
[B][COLOR="#FF0000"]0043ABC4       E8                                  DB E8
0043ABC5       07                                  DB 07[/COLOR][/B]
0043ABC6    .  66:B8 638B                          MOV AX,8B63
0043ABCA    .  15 7CB56E00                         ADC EAX,games.006EB57C
0043ABCF    .  3BD3                                CMP EDX,EBX                               ;  kernel32.7716500E
0043ABD1    .  7D 07                               JGE SHORT games.0043ABDA
0043ABD3    .  E8 D8ACFFFF                         CALL games.004358B0
0043ABD8    .  EB 46                               JMP SHORT games.0043AC20
0043ABDA    >  8B0D 48615F00                       MOV ECX,DWORD PTR DS:[5F6148]
0043ABE0    .  A1 381F3503                         MOV EAX,DWORD PTR DS:[3351F38]
0043ABE5    .  3BC1                                CMP EAX,ECX                               ;  games.<ModuleEntryPoint>
0043ABE7    .  8B0D 3C1F3503                       MOV ECX,DWORD PTR DS:[3351F3C]
0043ABED    .  75 1C                               JNZ SHORT games.0043AC0B
0043ABEF    .  3B0D 4C615F00                       CMP ECX,DWORD PTR DS:[5F614C]
0043ABF5    .  75 14                               JNZ SHORT games.0043AC0B
0043ABF7    .  68 5C958D00                         PUSH games.008D955C
0043ABFC    .  68 58958D00                         PUSH games.008D9558
0043AC01    .  E8 3A70FFFF                         CALL games.00431C40
 
Last edited:
UPDATE

1.18.7
- added new map "sod-2"
- remodeled "Fall_Game" code for new version of "Fall_Game"

DOWNLOAD

Offsets are set to tkPT 2.3.4
"sod-2" map is same old sod-1 map but in new space, in official server it is a SoD map for lv1-79.
"Fall_Game" is same old map but with new look and new minigame, most likely it will need additional server side code to start (?)
New tKPT have some additional informations for GM in overlay (weapon ID and number?)


rQJV5 - writeField Function (adding and editing PT fields) - RaGEZONE Forums



I also updated links in first post.
 

Attachments

No .ase file? just extract and make new folders like Old_dungeon? okay :).

--EDIT--
My server crashes when I copy the folders (Old_dungeon etc) to my server field folder. However when i copied the rest, the map ingame just loads. Do I need to change anything?
 
Last edited:
What do you mean when you say that you copy "rest"? Your server should have Field folder from client and you should extract my OLD_ maps to it.

If server is crashing than check if you added writeServerField.dll correctly. Everything is in first post.
 
I copied all the folders (old_dungeon etc) to my field in the client. I copied everything in Map and title and copied in both client and server. However when I try to copy the folders also to the field in the server, the server crashes. The strange thing is, the maps work just fine in game now. (except I have no Idea how to go to the maps besides using /field and there are no npc's/mobs spawning) Do I need to leave things as they are?

And also where are the spm and the spp files? I guess I need to make those myself? (Then i'm screwed 0.0)
 
Last edited:
I don't know why your server is crashing, maybe your files got corrupted. Try redownloading them.
Without maps in server folder, server won't know where ground is.
You can go to old_ fields only by using /field command (because they are not connected to new fields) unless you add scroll to your server that will teleport you there.
You can copy other spm, spp files and rename them to old_ names to add mobs.
 
There seems to be an error with the dungeon files. Only when I add those the server got runtime error. I try redownloading ;)

--Edit--
Redownloading doesn't help. There is something wrong with either my server, or the files :S, ... It seems it are not only the dungeon files. I will look into it. The maps in game just work fine. Weird.
 
Last edited:
Back