Scripts / "Dropping" items ideas needed

Author
Message
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 21st May 2015 23:01
I finally completed my inventory pickup, consumption/use, saving script but now have to bypass the entity destroy command when it comes to picking up and then being able to drop items.

Curious how others have addressed being able to "drop" items picked up somewhere else? My thoughts are I will have to move the entity somewhere out of view and reposition it at players X,Y and Z.

Any ideas out there?
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd May 2015 08:15
I would say that´s it. Or what do you expect?
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 08:30
I suspect that's the only option but others *may* have addressed it differently. That's why I asked.

As soon as one thinks there is only one way to do anything, abandon all hope he who follows here
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 08:31
I suspect that's the only option but others *may* have addressed it differently. That's why I asked.

As soon as one thinks there is only one way to do anything, abandon all hope he who follows here
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 22nd May 2015 09:10 Edited at: 22nd May 2015 09:11
maybe use a map location to move the picked up objects to, one that the player cannot access, such as inside a non enterable building, just set an array flag to 1 if carried, some work for the designer to find entity number and map positions though, then when drop is needed you just need to move the entity to just in front of player. The is how it worked when i wrotes txt adventures, room(255) was always the inventory, dunno if that helps.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 10:16
Thanks tarkus. That's essentially what I'm thinking.

I'm running a full user inventory so keeping track of it is no issue. I was wondering if there might be another way.

One way I was thinking is preload a heap of excess entities out of zone and simply swap what "was" to the new entity.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 22nd May 2015 11:07
that might work, but it gets tricky. Plus when level jumping carrying inventory from level to level, is that even possible?

we need a way to save multi dimensional arrays, like in the old amiga blitz basic days, you could get the memory address of the arrays and save the memory locations out.

sounds great what you are doing im really looking for an inventory solution, makes puzzles and gameplay more unique.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 12:52
Hi !nullptr,

I was just going through the lua bible ...

This link might help you.

https://forum.game-guru.com/thread/207801?page=4

Just under the superman script is a proximine_pickup script.

smallg picks up the mines, and then places then back on the map to kill the ai.

It might be worth a look...

I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 22nd May 2015 14:14
thats th only way. I do not think there is a option for storing in cache.
So my way would be:
take -> entity have no colision and invisible
use -> destroy entity
drop -> replace entity to player

I hope this helps you a little bit
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd May 2015 17:51
Hide(e)
CollisionOff(e)
is enough but the only issue is you will need to set it always active otherwise once the player leaves it's script cutoff range it wont be "working" anymore - that's why i normally just move it around with me
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 22:10 Edited at: 22nd May 2015 22:19
@tarkus - no problem there. I've written a save system so inventory/player stats/time etc. can go multi-level.

On your multi-dimensional arrays, they can be done (but they are a pain). A method I am using is to index the item in name properties. I then use that index, pick up a string from a hard coded lookup list for display in my inventory . I only parse the string to get the values when user looks at the inventory, ie: I don't keep the values or the entities, just the string. The only data I ever "carry" is the string for the items the user has (multiples of same thing is simply incremented). The entity is killed off and forgotten about at pickup. I simply eat/drink/use the "string" (which is removed on use).

This has the advantage of leaving me with a single location to edit any item properties (balancing for example) in one place regardless of the number of items or type of items placed on any given map.

entity.name = 1 or 2 etc...

eg:
if itemIDX == 1 then return "DRINK,Bottle of Water,10,1,800,0,1,1,0,1,2"
elseif itemIDX == 2 return "FOOD,Bush Berries,5,6,100,1,3,2,2,4,1"
etc.....

Every bottle of water on a map is simply named "1". The string contains weight, value etc.. etc... I add a timestamp to the string after pickup so I can deteriorate any contents.

(And I just save the string when I jump levels and the exact same parser/method applies)

@others
That's a better idea. I see what smallg has done with the mines. Unfortunately I can't carry the "e" because when I jump levels the "e" is worthless.

I've since settled on a stored list of items on each map ("e" picked up on level load) and bring the item to my position when needed. As long as I keep the "cache" out of range it shouldn't have any significant resource hit. In addition, when I load the save, I'll query what I have and only "tag" the cached entities that may be dropped in the new level and destroy any that *can't* be used.

ie: If there are "chips" in level 1 and I take 1 packet to level 2 and level 2 has no chips, I have stored "chips" (equal to maximum chips in level 1) to access (eg: 10) . Since I only have 1 packet, I pick up the "e" of 10 packets and destroy 9.

Can't think of a tighter way at the moment. Be so much better if we could just dynamically load entities....
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 22nd May 2015 23:05
i think that's the only way to do it right now if you really need the items to be droppable, it would indeed be nice to be able to clone objects but i can't see that coming for a long time.

@tarkus inventories are possible but only really text based output as we can only display 1 picture at a time, it's not much fun scrolling through lots of pictures but for a small inventory system that could be an idea, i may have another look at it now we have more input control though.
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 22nd May 2015 23:17 Edited at: 22nd May 2015 23:18
@smallg More input control? Can you elaborate? Is there a doc' anywhere on the new controls? Do we finally have mouse?

@tarkus - forgot to mention (smallg reminded me) that I use a panel for the inventory display with a "popout" image based on where the user has scrolled to. It's a bit of coding to get panel working off keys (no mouse control) but certainly behaves predictably.

Here's an example. Note: gfx's are placeholders at the moment - I'm changing the panel graphic etc. as I speak now I know the concept will work.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD

Attachments

Login to view attachments
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 01:09
Hi !nullptr,

I noticed in the picture in your last post with the panels. The background of the panels are coloured...

How do you assign the background colour?

Cheers,

I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 01:43 Edited at: 23rd May 2015 01:48
@perelect

The .png files for the panel are located in files\languagebank\neutral\gamecore\huds\panels

Once changed I suspect a verify cache with Steam will overwrite them so make sure you do backups - before and after

EDIT: The "item" image used the panel edging but is essentially an image, not a panel. For some strange reason we can't put text over an image so I couldn't use what I hoped I could. So instead, I'm modifying the panel to be.... better

2nd EDIT: There is also some panel artwork in \importer you might want to fiddle with too.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
perelect
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 02:07
!nullptr

Thanks
ill have a look at that now

Cheers
I may be old, but at least my memory still ....hmmm

Pavilion dv6 Notebook, Intel(R) Core(TM) i5-2410M CPU @ 2.30 GHz, Win 7 64 bit, 16 GB Ram, Radeon (TM) HD 6490M, 2336 MB Memory. Resolution 1366x768, Intel(R) HD Graphics 3000. (WEI 5.8)
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 23rd May 2015 11:42
No I was referring to bring able to cycle with the keyboard, before I had to cycle and select with only the 'e' key... It got very messy :p
I was actually planning something very similar to what you show in the image with the pop up image

For the text on top of images you could try making the image a bit transparent
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 23rd May 2015 21:28
Thanks smallg. The images I'm using are placeholders until I find out if we can eventually put text over images otherwise, yes, it'll have to be transparent backgrounds or completed artwork. The item details are mostly static anyway so art might be easier.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 24th May 2015 12:56
@!nullptr

That inventory looks fantastic, will you be selling it via the store..... and if so when..... looks very very good. Post apocalyptic writing heaven I'd say
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 24th May 2015 22:03 Edited at: 24th May 2015 22:11
Not going store side Tarkus sorry. Not because of any reason other than the inventory and player stats etc. is intricately bound to an entire system, right down to environmental effects and an autosave system etc. They are not PnP scripts, in fact none of it uses _init or _main except for my custom global.

GG is apparently doing a simplified inventory last I heard so might be a case of waiting a bit.

Certainly happy to offer individual tips for ideas etc.

As an aside - some of the items I'm using are by ErrantAI in the store. They have great graphic individuality which works well in such a system.
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 9th Jun 2015 06:19
Quote: "GG is apparently doing a simplified inventory last I heard so might be a case of waiting a bit."


Lee has told me in another thread they won't be working on the inventory system anymore and are leaving up to the community to figure out via LUA. I liked the concept work he was doing in Reloaded but i guess that's abandoned for whatever reason...................................
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 10th Jun 2015 00:03 Edited at: 10th Jun 2015 00:04
Quote: "Lee has told me in another thread they won't be working on the inventory system anymore and are leaving up to the community to figure out via LUA. I liked the concept work he was doing in Reloaded but i guess that's abandoned for whatever reason..................................."

If that is the case then those very "LUA solution providers" will need read access to all of the player variables (ammo count for example). In fact, if the full list were available already a basic PnP inventory system could be written and tested... by someone... in weeks, if not days. I bet at least 5 guys here could do it very quickly.

(And this is a point I have tried hammering home many times. If devs were to recognise the talent they have at their disposal and simply provide the access and the command set then scripters would have many of the demands filled - either free or available via the store. Fixed inventory is one of them. Saving is another.)

ofc, a custom inventory and/or save system is a whole new ball game - as has been discussed previously - and would remain that way even if Lee included a basic system. And it's this that scares some people off from providing any kind of PnP inventory/save system, the knowledge that some would expect it to work for everything/anything placed in a game.

"It doesn't work with my can of baked beans" and "please modify to include my left handed screwdriver" requests would be overwhelming.
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
Tarkus1971
Audio Media Maker
9
Years of Service
User Offline
Joined: 24th Feb 2015
Location: England, UK
Posted: 10th Jun 2015 19:01
we do seriously need a proper fully working level movable inventory system and a save/load progress too.. It's Vital for gameplay.
Aftershock Quad Core AMD FM2+ 3.5 GHz 8GB Motherboard and Processor, A7700k apu, AMD HD7870 gfx card.
King Korg Synth, Alesis SR18 Drum Machine, Akai MPX8 sample player, Roland Fantom XA Synth, Axus Digital AXK2 Digital Drum Kit.
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 10th Jun 2015 19:29
Nothing is abandoned, But Allowing the LUA commands to do such things, will bring even more power to the scripting capabilities of setting up inventory and other systems. These commands will be released in updates over time until they are all in place. Putting them in as needed in order to not loose any functionality.

With the number of capable scripters we have in the community, I can see them coming up with the solutions needed to make this happen faster. I am sure that some kind of base examples will be given to get most started.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit

Login to post a reply

Server time is: 2024-05-03 08:47:05
Your offset time is: 2024-05-03 08:47:05