imp
New Member
Posts: 15
|
Post by imp on May 26, 2018 21:26:28 GMT
hi all,
i have set up a local server and have astonia3 running. i also have a new area map, i made with a3edit.
could any of you explain, how/what i need to do, to get it in game for testing pls?
|
|
imp
New Member
Posts: 15
|
Post by imp on May 28, 2018 5:34:21 GMT
why is no one helping
|
|
|
Post by Admin on May 28, 2018 22:57:48 GMT
Hey, welcome to the forum!
Are you trying to create a completely new map from scratch? Or are you editing an existing map (im guessing the former)? If you are creating a copletely new map, there is a procedure you have to follow before you will be able to launch it. After you dump some tiles/walls into your new map, you need to also create a map DLL file (which has all the character drivers and such). This procedure is done in the makefile (file used to complile the server code). Post the name of your map/ server number you want to use and I'll be able to help you further.
I'll give you an example here:
open Makefile (part of the server source). Youll notive a bunch of makefile data which is used to create the DLL files. Cntrl-F 'arkhata' and youll find:
runtime/37/arkhata.dll
runtime/37/arkhata.dll: .obj/arkhata.o $(CC) $(DDFLAGS) -o arkhata.tmp .obj/arkhata.o mv arkhata.tmp runtime/37/arkhata.dll
.obj/arkhata.o: arkhata.c server.h log.h notify.h do.h direction.h path.h error.h drdata.h see.h drvlib.h death.h effect.h tool.h store.h area1.h $(CC) $(DFLAGS) -o .obj/arkhata.o -c arkhata.c
You can use this as a template for your new area. Copy the Arkhata entries and replace arkhata with your new area. The area specific code should be in a file calld <yourfile>.c (it should contain character drivers etc), and it should be linked in the makefile as arkhata.c in the example above.
|
|
imp
New Member
Posts: 15
|
Post by imp on May 29, 2018 4:53:24 GMT
hello Admin, thank you so much for replying. i think i finished the first 2. i have a folder called 38, inside it i have mymap.map and all the itm/chr stuff i made for the map, and i followed your steps adding lopatalo to Makefile. then i made a lopatalo.c folder, but now i'm lost.
yeti_food.itm Yeti.chr "wing stuff.itm" "well stuff.pre" "well stuff.itm" "well npc's.chr" "village stuff.itm" "village npc's.chr" "unlock stuff.itm" "unlock npc's.chr" "trading npc's.chr" swamp.pre Swamp.chr Spirit.chr "sacred area npc's.chr" pyra-wall.pre pyramid_maze.itm pyramid.itm pyra-block.pre pushboxes.itm openspade.itm mymap.map "maze teles.itm" "Master Guard.chr" Harpie.chr flyingtele.itm "cave stuff.itm"
|
|
|
Post by Horowitz on May 29, 2018 7:00:40 GMT
Ok, wow i see you’ve made quite the map already. The map 38 should contain the .map .chr and .itm items. Now you need to make sure that your area code (lopotalo.c??) contains all the code for the characters/items you created in the .chr/.itm files. You can use arkhata.c or area1.c as an example. Just make sure that every character you have uses a driver (check drvlib.h) which is mentioned in ch_driver(); ch_respawn_driver(); and ch_died_driver();. These functions should have a switch with all the drivers used by characters in your map (these drivers should also be listed in drvlib.h). Lopatolo.c should be in the main folder (next to arkhata.c) when compiling.
|
|
imp
New Member
Posts: 15
|
Post by imp on May 30, 2018 8:35:25 GMT
ok. i keep crashing the game.
so, i have this .chr:
lopa_talo_dad: name="Lorin" description="ymma, ymma, ymma ... *sigh*."
do i write this in drvlib.h?
#define CDR_LORIN 200 //lopatalo (well quest giver)
|
|
|
Post by Admin on May 30, 2018 19:22:18 GMT
Yes. Then in your .chr file you should have (for lopa_talo_dad):
driver=200
then in the area code file (like lopatalo.c) you should have:
int ch_driver(int nr,int cn,int ret,int lastact) { switch(nr) { case CDR_LORIN: lorin_npc_driver(cn,ret,lastact); return 1;
default: return 0; } }
int ch_died_driver(int nr,int cn,int co) { switch(nr) { case CDR_LORIN: return 1; //1= character can die. Enter respawn function here (optionally) default: return 0;
} }
int ch_respawn_driver(int nr,int cn,int co) { switch(nr) { case CDR_LORIN: return 1; //enter respawn function here optionally. default: return 0;
} }
your NPC code should be in the function you defined in ch_driver() (i.e. lorin_npc_driver(cn,ret,lastact) as in the example above, but you can give it any other name ofcourse).
|
|
imp
New Member
Posts: 15
|
Post by imp on May 31, 2018 12:24:12 GMT
omg and that's just for 1 char but the .itm driver are worst. i'm totally lost.
|
|
imp
New Member
Posts: 15
|
Post by imp on Jun 2, 2018 8:29:15 GMT
ok, i've done all the steps as explained. the server compiled and started and i can log in. how do i get to the new map now? the idea is, that a flying harpie(at karim in nomads) will tele me to the new village. that's harpies code so far:
harpie_teleport: name="Flying Teleport" description="somewhere, over the rainbow..." sprite=341 flag=IF_USE driver=10 arg="5D003D00000001" # x=93, y=61, a=0, quiet=1 ;
help pls.
|
|
imp
New Member
Posts: 15
|
Post by imp on Jun 2, 2018 12:40:47 GMT
i have placed a teleport beside karim, but get an error message
lol posting a pic not working.
ok, when i touch the tele it says:
ishtar touches a teleport object but nothing happens - target area server is down.
the teleport code is:
harpie_teleport: name="Flying Teleport" description="somewhere, over the rainbow..." sprite=14137 flag=IF_USE driver=10 arg="5D003D00260001" # x=93, y=61, a=38, quiet=1 ;
is a=38 correct? that's the folder containing the map and chr/it, so i thought that's the area to tele to. i'm so lost.
|
|
|
Post by Horowitz on Jun 2, 2018 17:52:24 GMT
MIf you edited the makefile correctly (see above), there is one more step if I recall correctly. The server.c file contains a piece of code which manages which area is started (i.e. To start area 38, you need to feed the command ./server -a 38 -d). You still need to add an entry for area 38 there. Then run he server through the terminal: ./server -a 38 -d
Then check if it started correctly: run the command ps aux
You should see ./server 1 to 38 in the list of processes.
Also try /goto 100 100 38 in game on a god character.
|
|
imp
New Member
Posts: 15
|
Post by imp on Jun 3, 2018 6:26:42 GMT
heh oh my. after adding ./server -a 38 -d i got a message that there's no lopatalo.h file. so i copied arkhata.h and changed the npc names to mine like:
{ int rimon_state; int eryf_state; int kubi_state; int loma_state; int mana_state; int paro_state; int rona_state; int dana_state; int quen_state; int teeno_state; int lorin_state; int kingrattus_state; int rattus_state; int bestia_state; int ymma_state; int ghostguard_time; int zyklopio_state; int taranta_state; int spirit_state; int mudro_state; int darko_state; int edin_state; int krono_state; int sano_state; int sonja_state; int masterguard_state; int darkguard_state; int zombieguard_state; int harpie_state;
}; and now i get an error message for every npc in the terminal
lopatalo.c:66:8: warning: implicit declaration of function ‘rimon_npc_driver’ [-Wimplicit-function-declaration] case CDR_RIMON: rimon_npc_driver(cn,ret,lastact); return 1; ^ lopatalo.c: At top level: lopatalo.c:83:5: error: conflicting types for ‘ch_respawn_driver’ int ch_respawn_driver(int nr,int cn,int co) ^ lopatalo.c:48:5: note: previous declaration of ‘ch_respawn_driver’ was here int ch_respawn_driver(int nr,int cn); // called when an NPC is about to respawn// EXPORTED - character/item driver ^ lopatalo.c:94:5: error: redefinition of ‘ch_driver’ int ch_driver(int nr,int cn,int ret,int lastact) ^ lopatalo.c:63:5: note: previous definition of ‘ch_driver’ was here int ch_driver(int nr,int cn,int ret,int lastact)
and on top of that i somehow degod me.
|
|
|
Post by Mozart on Jun 4, 2018 7:17:58 GMT
Implicit declaration means your code is calling a function which has not been declared yet (in the c file, functions need to be declared before they are called by other parts of the program).
Redefinition means you have declared a function twice or more. The compiler also shows you at what line the errors occur.
|
|
imp
New Member
Posts: 15
|
Post by imp on Jun 4, 2018 10:02:14 GMT
i typed /goto 100 100 3 (typo wanted to type 38) and game kicked me. internal error message. i created a new alt to see if it is player wide, but logged on fine. pls help, i deleted game client completely and made a new, but still the same.
flushed db and re-installed sql files and can log in again. still can't get on new map
|
|
imp
New Member
Posts: 15
|
Post by imp on Jun 5, 2018 7:07:31 GMT
i'm so sad. i removed all .itm .chr .pre files from lopatalo.map now, because i thought maybe 1 of those is causing the problem.
'make' works fine 'start' works fine, but 'ps aux' only goes to area 37.
and /goto xxx yyy 38 does nothing. what am i'm doing wrong?
|
|