Loading...
 

PogamutUT2004


Custom-Made Items

Dear all,

I am currently having problems in the process of setting custom-made items in UT2004.
These items will represent anything such as a map, money, flowers, ect.. For now they do not have to be physically modeled items which the player can see, rather items in a characters inventory.
Each character will have their own inventory which will store item. These items can be stolen, bought, sold, used as weapons or simply given.

Tried using Huner bot as an example to follow how items where being used which uses TabooSet:

protected TabooSet tabooItems = null;
protected Item item = null;
tabooItems = new TabooSet(bot);
if (item != null) {
tabooItems.add(item);
}

I will greatly appreciate feedback on this matter.

King Regards,

dirkmalta
Adding custom items to UT is not that easy actually. Each new UT item would require its own .uc class to represent it inside UT (even if there would be no graphical representation of it). You would end modding the UT environment itself if you would want to do it through UT.
On the other hand, you could simulate new items entirely on Pogamut Java side. There is some limited support for this. Jakub will have probably more info soon.

best.
michal
Thanks Michal.
I have contacted Jakub. I will surely post any replies which may be helpful to anyone interesting in this situation.

Regards,
dirkmalta
Hi Dirk!

I'm not quite sure what the question is, but here are some thoughts:

1) I'm not quite sure how to create custom items for UT2004, Michal
Bida will certainly be more helpful than me.

2) regarding TabooSet, it is a collection that works like "black
list", i.e., sometime death-match bot is unable to
reach a certain NavPoint or Item inside the map from his current
position but deterministic decision making algorithm (its logic)
would try to reach the same NavPoint / Item every time. Thus it is a
good technique to employ temporary "black listing" of navpoints
or items you can not currently reach. The TabooSet itself offers you
two methods how to "black list" item, either via
TabooSet.add(Item) ... which will blacklist it forever (unless removed
using remove()), or
TabooSet.add(Item, Time) ... which will blacklist it for a specifiead
amount of seconds.

Finally, the TabooSet has filter() method that may remove any
blacklisted items from a collection you pass into it.

So here it is how it is used:

1) when choosing item where to run to you do something like (pseudocode):
item = pickSomeItemFromCollection( tabooSet.filter(itemsIWantToRunTo) )

2) run to item
pathExecutor.execute(pathPlanner.compute(item))

3) if the run fails, you just tabooSet.add(item, 30) // blacklisting
item for 30 secs
goto 1 // so in (1) you won't pick the same item again

Does it help?

Cheers!
Jakub
Hmm, I think the question is "how Pogamut are treating items of unknown class" ?

Best,
Jimmy
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
Hi all,

Thank you all for your replies. I feel I wasn't fully clear on what I wanted to accomplish.
My goal is essentially to have new pickup items like in an adventure game. You have suggested two ways for creating new pickup items. One was creating a mod, and you also hinted there is a possibility of doing such a thing through pogamut. Is the latter actually possible? Or is it only possible through a mod.

Regards,

dirkmalta
I think the best case scenario is as follows: a) You create an UT mod that adds items you want to have in your game and b) you will extend the pogamut to support these new kinds of items.
This is indeed possible, there are some tutorials on unreal wiki and beyondunreal forums concerning the a), when you are ready with items in unreal, we can explain how to achieve b).

Best,
Michal
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.