[Pogamut-list] Custom-Made Items
jakub.gemrot
pogamut-forum at diana.ms.mff.cuni.cz
Tue Dec 7 08:14:11 CET 2010
Re: Custom-Made Items
Author: jakub.gemrot
Well here are some more thoughts:
1) every INV message from GameBots2004 (message decribing an item you can currently see) is having "Type" which is of type "ItemType".
2) whenever our parser of GameBots2004 protocol encounters such field, it will try to translate the string using ItemType.getType(String)
3) if passed "Type" field contains unknown identifier (i.e., it is a custom user item), it will categorize the item as "Other", i.e., it will return an ItemType with
this.category = Category.OTHER;
this.group = Group.OTHER;
4) there is a potential pitfall, if you will try to mask "real items inside UT2004" meaning, you will try to just change models for rocket launchers, flak cannons, health packs, whatever, that the UT2004 will export "Type" with recognized value and ItemType will wrongly categorize your item as Health or Weapon
5) but if you manage to force the UT2004 to pass different "Type"s (I think the type goes under "PickupType" field inside UnrealScript), you will be fine
6) everything beyond parser is working as you would normally excpect, i.e., all listeners hooked to the Items will be notified so you may catch that
-------------------------------
7) regarding custom rules for the scenario (i.e., what to do when your bot picks up the flower or map), you will probably need to implement your own "inventory" that will listen to Item events and track what the Bot has in the possession
8) moreover you will probably need to create some java methods that would somehow do something with these items (i.e., create "game mechanics" for new objects) ...
... I will stop for now with explanation and see what will catch your eye ;-)
... If I missed the point again, please do ask more :-)
Cheers!
Jimmy
--
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=453&post_reply=1#form>
More information about the Pogamut-list
mailing list