RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Need help with...images?[RMXP/VX]

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 88
NOTE: This question is in the context of XP/VX, and sorry if its in the wrong place.

I have a trap system in my game that allows the player to set traps anywhere on the field that the character can walk on. While most traps are represented by simple pictures, 1 trap in particular posses a problem. This trap is very customisable in its placement, and per single instance of this trap 16 tiles are required. Now the problem here is how to visually represent each tile of this trap. Since this trap is very customisable in its shape, there would have to be hundreds, if not thousands of pictures to accomodate each possible set up.

Since making so many different pictures would be very ridiculous, I was thinking of using a picture per tile. With a maximum of 10 traps being set up at once, worst case scenario would necessitate me 160 pictures just for the traps (aside from a generous 20 I set aside for hud/other). With a 50 picture limit (and apparently VX has a 20 pic limit, unless thats just a limit in the trial version), thats surely a problem.

What I need help with is coming up a reasonable method to represent the part of the trap on each tile, no matter that specific traps shape, for 10 traps (worst case scenario). I heard that more pictures could be shown with scripts, but that that also will have massive lag (any way to get around it?).

Another way I was thinking was having an event represent each tile for the picture, but layering every walkable tile with events to cover every possibility of the potential set ups also causes major lag, as well as being a ridiculous workload for each and every map in the game. Is there any way to simply teleport an event from a map that is premade to contain these events for such occurances (without having to swap it with another event)?

Or I was thinking of simply swapping a certain tile with the same tile, but with the image of the trap already drawn on it. Although this would require probably a few hundred tiles in order to make sure I got every different looking tiles double, it would be better then using pictures. Or, since XP has many layers, maybe I could just make an invisible tile on, say, the 3rd layer and then swap it for a tile with the image of the trap when needed. That way I wouldn't have to have premade 200+ different tiles. Since I haven't noticed XP or VX having tile substitutions like in 2k3, I wonder if this is even possible.

All I need out of this is to visually represent on the map that there is a trap there in any way possible, and for it to be able to handle up to 160 tiles. All the coding will be taken care of elsewhere. Help me make any of the mentioned methods work, or if they are impossible, please provide me with other methods that could work.
« Last Edit: January 07, 2008, 10:29:23 PM by InvaderZim »
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

**
Rep:
Level 88
So....does anyone want to help me with this?
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

*
Rep:
Level 87
why don't you just have 16 events, each with a different part of the trap, and move them to the appropriate positions once the trap has been placed?  You'd probably need to put in a bit of work determining where to move the event to, depending on it's shape.  I'm making the assumption that each of the 16 tiles can only be used once in any given trap shape.

You're either thinking about it too hard or I'm missing the point entirely.
Always remember you're unique.
Just like everybody else.

**
Rep:
Level 88
No, you're on the right track (understanding the problem at least). I've considered the exact method you mentioned, but as I said, 16 tiles x 10 events (worst case scenario) would result in 160 events, PER MAP (I'm guessing I'll have a few hundred maps you can fight on so...too much work), along with 20-50 other events present on each of the maps. While I guess the work doesn't really daunt me, it could create quite massive lag.

As I've said, my best possible solution to this particular method would be to create a specific map to house these 160 events when they are not in use, and teleport them to the correct map and tile when needed (an easy process). The thing is, I as of yet don't know if it is even possible to teleport in an event from a different map (aside from switching it with another event, but that would defeat the purpose). And still, there may be the problem of lag once those 160 events all are present on the same map...

Keep em coming  ;D
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

*
Rep:
Level 87
I don't believe you can transfer events from one map to another, though Seph wrote an event spawner script that I've not really looked into.

Why do you need 160 events?

If your trap is going to be made up of the same 16 tiles, just in different arrangements, then you only need 16 events - each one with a different tile image.  Or if your trap will always be made up of 16 tiles, but some of those tiles could have the same image, you can still use just 16 events and.

When you figure out what arrangement is needed, have each one move to its appropriate position and display its image.  THIS could involve a lot of IF tests to determine where each tile needs to be.  Or a lot of IF tests to determine which image should be shown (either have the images as part of the tileset, or as their own charset - don't use pictures).  I would possibly resort to using a script for this, simply because, for me, it'd be easier to keep track of what I was doing and less "messy".

ok - let me go back to your first post.  You said 10 traps, with most of them being a single image, but one in particular that's made up of 16 images in some arrangement.  But then you started talking about 10 traps as if all 10 were made up of 16 images.  How many traps exactly will be a combination of the 16 images?
Always remember you're unique.
Just like everybody else.

**
Rep:
Level 88
Ok, the character can set up to 10 different (or same) traps. Most (so far all) others are one-picture traps, but this one requires 16 different events/pictures (per single trap). At most, you can set up 10 different instances of this 16-event/picture trap (yes, all 10 set up traps can be of the exact same type). Thus, 160 events/pictures will be necessary to accomodate all of them.

Now as far substituting tiles, in 2k3 at least a tile substitutes a specific tile no matter where it is on the map. I don't know about XP, but I need it to substitute 1 specific tile located at X, Y. If it is possible, I don't know of it yet, but it would be exactly what I need.

While I won't mind using scripts (in fact, I may prefer it), these questions don't really go deep into the coding aspect, rather the "is it possible? If so, how" aspect.
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

*
Rep:
Level 87
yes, if all 10 traps COULD consist of 16 tiles, then that's 160 events you'd need.  That could possibly add a fair bit of lag.

I'm sure it's possible, but it'd be a lot of work whether you did it through events OR scripts.  And the potential lag...  now your question will be "does it HAVE to be done" and "is it worth the effort".
Always remember you're unique.
Just like everybody else.

**
Rep:
Level 88
"does it HAVE to be done"
Preferably, yes. But I refuse to handicap the system I have in mind until I'm sure its not possible.

"is it worth the effort".
The answer to that is always a 'Yes' :). I can't stand leaving something as is when I know I can do better.

While you say you are sure there is a way, I would like to hear of one first before I am satisfied :/
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

****
Bitch
Rep:
Level 87
Bits'n'Pixels
The answer to that is always a 'Yes' :). I can't stand leaving something as is when I know I can do better.

Great attitude.
Anyways.  I'm kinda rushin' so skimmed the the post (it caught my interest) and i'll re-read it later, so forgive me if i mis-understood anything, but here's my idea for what i took in:
Set up events on each tile, but have them all pre-conditioned to a certain switch, activated by [whatever].  Instead of tryin' to lay loads of events down on each tile, just set up loads of pages on each event, each to suit what's happening, although you'll probably need more switches in the first place, but if that's not a problem you could work that.  I'm currently doin' that on one of my projects...switch setting a big event (38 tiles :D) so it changes quickly between 2 and 3 different images, but it stays in the same place, so i only have to have 3 pages on each event~tile.

Again, forgive me if i made no sense or mis-understood.  will check when i get back later.
All the best for now

**
Rep:
Level 88
Anyways.  I'm kinda rushin' so skimmed the the post (it caught my interest) and i'll re-read it later, so forgive me if i mis-understood anything, but here's my idea for what i took in:
Set up events on each tile, but have them all pre-conditioned to a certain switch, activated by [whatever].  Instead of tryin' to lay loads of events down on each tile, just set up loads of pages on each event, each to suit what's happening, although you'll probably need more switches in the first place, but if that's not a problem you could work that. 

Either I misunderstand, or you are contradicting yourself :x. Using many switches and variables is not a problem for me (XP can has no switch/variable limit, right?) unless having so many in the game will somehow lag it (not necessarily using many at the same time).


I'm currently doin' that on one of my projects...switch setting a big event (38 tiles :D) so it changes quickly between 2 and 3 different images, but it stays in the same place, so i only have to have 3 pages on each event~tile.

I think thats what you misunderstood about mine. I need to be able to set up this event on any walkable tile on any map where battles can occur. And anyway, without somehow teleporting events in from a different map, that minimum of 160 events per map will lag it, I've checked (I'm not even talking about setting an event on each walkable tile on the off chance the trap will be laid there).

If thats not what you meant, then I misunderstand, sorry. Can you explain it in more detail?

STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

****
Bitch
Rep:
Level 87
Bits'n'Pixels
I meant instead of setting up several events on each tile, you would set up one event on each tile, but with many pages.

Hmm...not sure how to explain in more detail....
Take this image as an example:

Switch A:
  _
/    \
\ _ /

That's 6 events (one events for each piece of the.....something) Now that'll be wherever you set it to be first.  Switch A being turned on will cause these to appear.
If we make more events around it that are empty: (i'll use * to signify events with no graphic)
Switch A:
  _
/   \ *
\_ / *

That's now 8 events, two with no graphics on their first page, set to appear with the being-turned-on-ness of switch A.  Now, we turn off switch A, and turn on switch b (representing moving the trap to the next available slot on the map)
Switch B:
    _
*/   \
*\_ /
                                                                                                                                                       _
So the first column had / and \ on their first page and * on the second.  the second column had    and _ on the first page, and * on / and \ on the second.
Get what i mean?  Then on the third page, the second column would have * as well as the first column on their second and third page, each switch / page on each event representing a possible location for the ... the something.  But as i said, this would take as many pages and switches as possible locations (potentially in the hundreds) but with a huge or unlimited limit on switches and no limit to events it's very easy...just....takes up...loads of time and effort.
It's my non-sophisticated way of doing...almost everything i've done from scratch in my own way, i've later went to find an easier, quicker, less-hassle way, but hey...that's my way baby! :D

Hope it helps.

**
Rep:
Level 88
But...if I understand correctly, that will require an event on each tile on every map X_x. That's what I'm trying to avoid (as I've mentioned, 160 empty events alone will cause the slideshow effect. A 30x30 map would have about 500 events, excluding places where you can't walk, thus not requiring an event).

Also, I don't see the necessity of having multiple pages (more then 2). If I understood your example, simply alternating between 2 pages would be enough (1 page with picture, 1 w/o).

Also also, you seemed to have described the situation for only a certain trap shape. You missed the part where I said that that particular traps shape is very customisable.

At one time it can be set up like this:
################

Another like this:
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#

Another like this:
  #
  ##   #
     ###
   ##  #  #
##     ###

As long as its under 16 tiles, and each tile touches at least another tile on at least 1 side (stemming from the original tile), any shape is allowed (in order to fit into any passage/gap/dead end).

If I had traps with defined shapes (or at least a certain range of shapes, such as 1x1, 2x2, 3x3, 1x3, 8x2 (basically rectangles/squares)) then I could just make a picture to accomodate those...under 100... set ups and be done. But as it is, I would have to make probably a few thousand pics to accomodate each possible combination.
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

****
Bitch
Rep:
Level 87
Bits'n'Pixels
Yeah, the same would apply with my example and your trap.  it could be the same, but would require more pages.  As long as you can sit and work it, it'll fit, but you'll need pages for positions x shapes.

If you want it for literally anywhere though, not just certain areas, then yes, that'd be a bad idea, needing thousands of events with dozens of pages each......that's a no-no....oh well...

**
Rep:
Level 88
Yep. Although I think I've found most, if not all, the possible solutions for this problem (in the first post). Just need to work the kinks out of them.
STILL NEED FEEDBACK ON MY RUNNING/JUMPING SYSTEM!
http://rmrk.net/index.php/topic,16158.0.html

****
Bitch
Rep:
Level 87
Bits'n'Pixels
Well, only a shame i couldn't help.
All the best with that ;)