|
2 registered members (TipmyPip, Quad),
7,987
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Nighthawk RPG template for lite-C
[Re: GorNaKosh]
#282167
07/30/09 15:53
07/30/09 15:53
|
Joined: Mar 2009
Posts: 146 USA
paracharlie
Member
|
Member
Joined: Mar 2009
Posts: 146
USA
|
After doing these add_structs I still have a showdescription error in inventory and equipment. Not sure where to place those or what to use as the void* data that the add_struct calls for. Here is what I have done so far and not sure if these are even correct.
add_struct(NHAC_CINVENT_CELLS[NHAC_CINVCELLS], sizeof(RPGItem)); add_struct(NHAC_CINVENT_EQUIP[NHAC_CINVCELLS], sizeof(RPGItem)); add_struct(NHAC_MOUSEITEM, sizeof(RPGItem));
A8 Commercial
|
|
|
Re: Nighthawk RPG template for lite-C
[Re: Claus_N]
#282264
07/31/09 01:03
07/31/09 01:03
|
Joined: Mar 2009
Posts: 146 USA
paracharlie
Member
|
Member
Joined: Mar 2009
Posts: 146
USA
|
Yeah I dont know. This is little bit beyond my ability and kinda frustrating. I was planning on doing structs for character stats, monster stats and combat tables but now I might rethink it all unless I can figure it out.
A8 Commercial
|
|
|
Re: Nighthawk RPG template for lite-C
[Re: GorNaKosh]
#282326
07/31/09 10:26
07/31/09 10:26
|
Joined: May 2004
Posts: 1,510 Denmark
Claus_N
Serious User
|
Serious User
Joined: May 2004
Posts: 1,510
Denmark
|
I think that the best way would be to put all struct instances into a linked list, to easily iterate through them and make sure that all items are saved. About the items on the ground - those entities got the address of an RPGItem instance, and that address might not be valid after a game_load. Another option is to remove the RPGItem-instance when an item is dropped on the ground, and then store the item stats in the skills of the entity (and then re-create the RPGItem instance when the item is picked up). However, it would be very nice if struct-instances in Lite-C was saved automatically - I'll suggest that in the "The Future" forum 
Last edited by Claus_N; 07/31/09 10:27.
|
|
|
Re: Nighthawk RPG template for lite-C
[Re: Claus_N]
#282943
08/04/09 18:09
08/04/09 18:09
|
Joined: Mar 2009
Posts: 146 USA
paracharlie
Member
|
Member
Joined: Mar 2009
Posts: 146
USA
|
@Claus, I was thinking since the members of the data structure only exist during runtime that maybe they should be saved to a file. I found similar in aum 83 and aum 69. If they were saved to like a *.ini file then they could be read anytime and none of the information would be lost. The thing is that your template is alot of code and every instance would have to be found and then read from a file.
I'm still at the artwork stage of my game and unfortunately I dont have the time to help.
A8 Commercial
|
|
|
|