Home » MODDING HQ 1.13 » v1.13 General Development Talk » How does item ownership actually work?
How does item ownership actually work?[message #338136] Sun, 07 December 2014 13:46 Go to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
(I'm not sure if the following is a bug, an incompletely implemented feature or I'm simply too dense to understand the program. Since I assume that the answer needs knowledge of the code, I've placed the question in "Development Discussion" If this is wrong, feel free to move the thread)

1.13 Stable Release V7609 unmodified
In San Mona Sector D5 (Kingpin/Fight Club) there are many items with assigned ownership.

According to the map editor, ownership is as follows:
ACA Building in north estern map corner:
left locker - ammo stash - profile ID of owner is 95 = Kyle Lemmons
middle locker - set of kevlar body armour - profile ID of owner is 78 = Carmen Dancio
right locker - Mini-14 - profile ID of owner is 72 = Maddog

Private house south east of ACA Building:
ammo and stun grenades - profile ID of owner is 91 = Tony

Kingpin's house:
items are owned by profile IDs
73 = Darrel Jr.
77 = Enrico Chivaldori (!)
85 = Brenda Drake
76 = Auntie (!)
94 = Damon

However, if you take any of the items listed above in view of a Kingpin faction member, he turns hostile.

I have even tried to let Maddog take his own Mini-14, with the same result.

Why would Kingpin protect Enrico Chivaldori's or Auntie's possesions?
Why is a character attacked for taking his own items?
Does it even make a difference who is set as the owner of an item, or does the program simply react to any taking of an owned item in the same way?
If there is no difference, what is the purpose of setting the owner ID?


Report message to a moderator

Sergeant
Re: How does item ownership actually work?[message #338197] Thu, 11 December 2014 05:47 Go to previous messageGo to next message
M16AMachinegun is currently offline M16AMachinegun

 
Messages:304
Registered:September 2013
I recall a thread regarding an individual that could not get helped by the Cambria hospital. The reason was that he had stolen supplies from the Cambria Hospital Warehouse, which had item ownership.

Placing items anywhere back in the warehouse wouldn't work, what he needed to do was place the original items back in the crates where he got the items.



To your topic, I believe ownership is labeled as being in a certain place upon map creation/entering into game save/memory.

Report message to a moderator

Master Sergeant
Re: How does item ownership actually work?[message #338225] Fri, 12 December 2014 11:28 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
M16AMachinegun
To your topic, I believe ownership is labeled as being in a certain place upon map creation/entering into game save/memory.


Thanks for your answer.

Yes, I'm aware of that. To be exact, there is an item called "Ownership" placed in a stack with "real" items, marking that stack as "owned" (unable to be taken from the map inventory, provoking hostility when taken in tactical...)
This "ownership item" is linked to an "owner profile ID". I assume that this refers to the ID in Mercprofiles.xml
(Can anyone confirm this assumption? If it is not linked to Mercprofiles.xml, to what else?)

My problem is that the program doesn't seem to take the ID of the owner into account when determining the reaction of civilians present. (See my example above: Maddog getting attacked for taking a Mini-14 that should belong to him, Kingpin's goons defending Auntie's property)

Report message to a moderator

Sergeant
Re: How does item ownership actually work?[message #338226] Fri, 12 December 2014 11:42 Go to previous messageGo to next message
JAsmine is currently offline JAsmine

 
Messages:306
Registered:May 2011
Ownership can refer to a certain profile ID or to a faction. Faction overwrites profile ID.

So, placing an Ownership in sector D5 with faction = Kingpin makes the items stacked above belong to the Kingpin faction. Entering an additional profile ID for the Ownership does nothing.

At least, that's what I made out of my experience with the editor. How things are handled code-wise, I don't know.

Report message to a moderator

Master Sergeant
Re: How does item ownership actually work?[message #338227] Fri, 12 December 2014 12:04 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
First, the soldier profile of the ownership item is checked.
Second, the CIV_GROUP is checked.
HICKS_CIV_GROUP is skipped if FACT_HICKS_MARRIED_PLAYER_MERC is true.

If the owner is alive (bLife >= OKLIFE) and can see merc who picks item, then he becomes grumpy.

See code in Handle Items.cpp
Toggle Spoiler

Report message to a moderator

Lieutenant

Re: How does item ownership actually work?[message #338232] Fri, 12 December 2014 19:42 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
JAsmine
Ownership can refer to a certain profile ID or to a faction. Faction overwrites profile ID.

So, placing an Ownership in sector D5 with faction = Kingpin makes the items stacked above belong to the Kingpin faction. Entering an additional profile ID for the Ownership does nothing.

At least, that's what I made out of my experience with the editor. How things are handled code-wise, I don't know.


Thanks a lot, that was the salient point. I really simply didn't notice that faction button below the Profile ID field. Embarrassed

Should get my eyesight checked urgently...

Report message to a moderator

Sergeant
Re: How does item ownership actually work?[message #338234] Fri, 12 December 2014 20:56 Go to previous message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
Sevenfm
First, the soldier profile of the ownership item is checked.
Second, the CIV_GROUP is checked.
HICKS_CIV_GROUP is skipped if FACT_HICKS_MARRIED_PLAYER_MERC is true.

If the owner is alive (bLife >= OKLIFE) and can see merc who picks item, then he becomes grumpy.


Thanks. Once I actually saw the CivGroup button in the editor, it all made sense...

Report message to a moderator

Sergeant
Previous Topic: Faces
Next Topic: [Question\Request] Possibility to bring Mike back from dead
Goto Forum:
  


Current Time: Wed May 01 20:58:17 GMT+3 2024

Total time taken to generate the page: 0.00824 seconds