Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 3 of 6 1 2 3 4 5 6
Re: Nighthawk RPG template for lite-C [Re: Claus_N] #279516
07/17/09 21:45
07/17/09 21:45
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Thats very strange. I didnt make any changes and its the exact copy of the link above. The description shows up but not the item bmap itself when I mouse over. If I pick it up it is attached to the mouse and you can see it but not otherwise. That would be horrible to find out that it works on some customers machines and not others.


A8 Commercial
Re: Nighthawk RPG template for lite-C [Re: paracharlie] #279523
07/17/09 21:53
07/17/09 21:53
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Ok I was curious to see what would happen if I published it.
The item icons show up in the inventory but they do not refresh to the blank icon. So basically if you pick up the cracked short sword and put it in the weapon slot a copy of the sword icon is still in the inventory even though its empty. If you pick up a helm from the ground it will draw over the sword icon in the inventory and then it will itself leave a copy of the icon in the inventory as many times as you move the item around. So I guess this might be the real problem.


A8 Commercial
Re: Nighthawk RPG template for lite-C [Re: paracharlie] #279641
07/18/09 14:51
07/18/09 14:51
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
It sounds like last time I ran the level, however today it worked fine (except for a part of the weapon-bmap not being drawn properly in the inventory somehow).

It's like it's making less sense everytime I run the level :s

Re: Nighthawk RPG template for lite-C [Re: Claus_N] #279751
07/18/09 23:42
07/18/09 23:42
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Sounds like we may need help with one of the other Lite-C programmers here who has more experience. Hopefully one of these other guys here can take a look at it. I'm sure we can make your system the best out there Claus. Thats what I'm hoping.


A8 Commercial
Re: Nighthawk RPG template for lite-C [Re: paracharlie] #279753
07/19/09 00:19
07/19/09 00:19
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
I think that I'll simply just rewrite it sometime. I've just started writing a Diablo-style inventory in Lite-C, and it just seems so damn easy smile

An inventory like the one in these RPG Templates should be even way easier to write, so it shouldn't take long smile I'll finish this diablo-style inventory first though.

Re: Nighthawk RPG template for lite-C [Re: Claus_N] #279756
07/19/09 01:03
07/19/09 01:03
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Sounds great Claus! I'm good at actual mechanics but when it comes to inventories it just all looks greek to me. So I look forward to it. I guess I should learn to write my own inventory some day but I have higher priorities that I have to accomplish.


A8 Commercial
Re: Nighthawk RPG template for lite-C [Re: paracharlie] #281023
07/25/09 00:33
07/25/09 00:33
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Okay, I finally got the time for re-writing the inventory system smile it's not done & uploaded yet though.

The function names are the same, and their functionality is still the same - I just either rewrote the functions or simply just changed them to support the structs.

The item-files (ILF) can still be used, and the items in this file, can be used as a "item template" for creating new items using this new function:
Code:
RPGItem* RPGItem_Create(var _number)
{
	RPGItem* _item = malloc(sizeof(RPGItem));
	memset(_item,0,sizeof(_item));
	
	if(_number >= 0 && _number < NHAC_max_items && CITEM_handlesInit_n == true)
	{
		_item.name = ptr_for_handle(NHAC_CITEM_NAME[_number]);
		_item.bmap = ptr_for_handle(NHAC_CITEM_BMAP[_number]);
		_item.model = ptr_for_handle(NHAC_CITEM_MODEL[_number]);
		_item.skin = NHAC_CITEM_SKIN[_number];
		_item.type = NHAC_CITEM_TYPE[_number];
		_item.damage = NHAC_CITEM_DAMAGE[_number];
		_item.defense = NHAC_CITEM_DEFENSE[_number];
		_item.addhealth = NHAC_CITEM_ADDHEALTH[_number];
		_item.addmana = NHAC_CITEM_ADDMANA[_number];
		_item.addspeed = NHAC_CITEM_ADDSPEED[_number];
		_item.reqlevel = NHAC_CITEM_REQLEVEL[_number];
		_item.value = NHAC_CITEM_VALUE[_number];
	}
	
	return _item;
}



And there's a function for removing items as well:

Code:
void RPGItem_Delete(RPGItem* _item)
{
	free(_item);
}



There are no syntax errors, but I'm getting some crashes, however I'll get some sleep before figuring that out smile

P.s. The item struct looks like this:
Code:
typedef struct RPGItem
{
	BMAP* bmap;
	STRING* name;
	STRING* model;
	var skin;
	var type;
	var damage;
	var defense;
	var addhealth;
	var addmana;
	var addspeed;
	var reqlevel;
	var value;
} RPGItem;



Re: Nighthawk RPG template for lite-C [Re: Claus_N] #281024
07/25/09 00:39
07/25/09 00:39
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Quote:
I guess I should learn to write my own inventory some day

It's actually just an array of items wink Then you need a panel to show the items, with a click-event to swap the clicked item with the item held by the mouse.

Of course it way more complicated if you e.g. want to create a "tetris-inventory" (diablo-style inventory). It's as well a bit more complex to re-write an inventory system for a system like this (RPG Template), as it has to fit into the other code, and due to that fact the original item system worked in a different way.

New Inventory System - Nighthawk RPG template for lite-C [Re: Claus_N] #281387
07/26/09 23:14
07/26/09 23:14
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Finally the inventory system is done!

You can get it here:
http://rpg.nighthawk.dk/center/?PageID=downloads

Writing the code didn't take that long, but then fixing crashes, empty pointers, and lots of wierd errors really took some time, so I just hope it's working for you as well wink

It's fully compatible with the previous item system, so the item-list-files (.ilf) can still be used, even though this item system works in a very different way.

My hair almost turned grey whilst making this code work - and I'd say that it's a bit too early as I'm only 18 yet blush

Re: New Inventory System - Nighthawk RPG template for lite-C [Re: Claus_N] #281396
07/27/09 04:02
07/27/09 04:02
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Looks really nice Claus! I'll download and give it a shot. I'll let you know how it goes when I get a chance.

Sorry Claus I can't find the link to download it or it does not show for me on your site.

Last edited by paracharlie; 07/27/09 18:52.

A8 Commercial
Page 3 of 6 1 2 3 4 5 6

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1