Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Build on Map Script [Solved]

JoshC

Member

Ok this might be impossible but I was wondering if someone could make a script for me... Basically it's sole function will be to setup a map on request from the player. Wow, this is going to be difficult to explain... um....

The idea is the player will click an event for instance and it will give him/her the option of whether they want to build a house, shop, farm, etc, whatever. Then once the player clicks an option it will respond by maybe putting a construction site on the map and over time that site will turn into a building or eye candy type object or whatever. Of course the player has to have a certain amount of certain items in his/her inventory, and it will cost a certain amount of money. And I'm not talking about a single tile building or whatever, or I would simply do it with an event. I mean like a 5x5 tile-set. Like what an actual town or area would look like. But make it so that the building can be anywhere between 1 tile to many tiles.

I'm not really good with these descriptions, but that's the basic idea. Oh and this would be for RPG Maker XP.

If you have any further questions just ask or email me at joshtcagle@msn.com
 
SolstICE":1fn4vr8o said:
think too big for script request. try using events? may be easier for you. dudes used to make custom systems like it in rm2k

The real problem is that, in general, the community's eventing skills have atrophied since we started scripting. Aside from the fact that this would be an insanely complex evented system, it would also cause a lot of lag, especially on slower systems. I'd much rather play a gaem with a scripted version of this system. (Especially since this system requires multiple tiles work together to form a seamless image, which is, as I mentioned, rather difficult to do with events.)
 

JoshC

Member

The only problem with using events is that there would be a lot of events covering virtualy the entire map. And then you would have to make it so that every event can correspond with all the others and change simultaneously, without screwing up any of the other events. In the end its a lot of work and it can become confusing very easily. The idea is that I want the player to be able to place a building where ever they want and not in a preset area. GlitchFinder is on the mark.
 
SolstICE":528b3skg said:
think too big for script request. try using events? may be easier for you. dudes used to make custom systems like it in rm2k

The problem with events is that it makes XP and VX lag A FUCKING LOT... And that makes me really sad.

I was about to say I did a script for that, but unfortunately it's for VX only.
If you're interested: viewtopic.php?f=11&t=61004
 

JoshC

Member

Any chance of conversion? If not could you tell me what kind of info on RGSS to look at to convert it myself, or perhaps some links? I'm a Software Engineer so languages are easy to me, but I'm not used to RGSS or RGSS2 yet. So any help would be most appreciated. Don't suppose it would be too difficult since it's a fairly small script, though the conversion between RGSS and RGSS2 might extend it a bit....

And yes that VX Demo is pretty much what I'm talking about, though it seems inconvenient to have to copy a map to map like that, wonder if it's possible to copy only a section of that particular map, perhaps using variables. And also your demo is missing a parallax image by the name of "Sea of clouds", a simple fix if you just create a bmp file and draw something in it, name it that and then import it, but still, thought you might want to know.
 
I don't usually convert my scripts back to XP but I can give it a try.
The most important thing in this script is the map data. The script reads a region of a source map and copies this data on the destination map.

EDIT:
Done! I have updated the topic and added the XP Version. There's a little constraint to the XP version. The tileset of the Destination and Source map must be the same. That's all!

Take care
-Dargor
 

JoshC

Member

Thanks a lot Dargor. I'll just have to work around the constraints, that's fine, a little challenge always makes things fun! (I suppose if I use custom tileset images then I can simply trick it into making what I want....) :biggrin:
 

JoshC

Member

Ok, problem, I put the script in and set everything up. But it gives me a 'SyntaxError occurred while running script' error message when I call the script's function. Did I do something wrong?
 

Tdata

Sponsor

My simple solution to You build on map is to use 1 event. The graphic should be of the building being built. I do this in one of my scrap games. Though it is a scrap because I ran out of patience with my building.
 
Josh, that error usually occurs when your statement in the Event Command Script Editor is too long for one line. It will try to break it up into separate lines for you, but it doesn't care about syntax.

You can break up the lines with a backslash '\' , but make sure the backslash is not in the middle of an expression, and there are no spaces after the backslash. So, something like...

$game_map.add_map_layer(2, 3, \
Rect.new(0,0,160, 160), 0, 0, false)
 

Jason

Awesome Bro

Glitchfinder":1iof79zm said:
SolstICE":1iof79zm said:
think too big for script request. try using events? may be easier for you. dudes used to make custom systems like it in rm2k

The real problem is that, in general, the community's eventing skills have atrophied since we started scripting. Aside from the fact that this would be an insanely complex evented system, it would also cause a lot of lag, especially on slower systems. I'd much rather play a gaem with a scripted version of this system. (Especially since this system requires multiple tiles work together to form a seamless image, which is, as I mentioned, rather difficult to do with events.)

Ahem, all I ever use are events, I CAN do a LITTLE bit of scripting although its not anything amazing (Just HUD's, editting menu's, and a few extras), I prefer to event everything I make cause it's easier for me to fix any problems or add onto it (Seeing it makes more sense than looking at numbers and gibberish scripts), and if I ever get lag from too many events, I just slap an Antilag script in and it works fine o.O
 
Dirty way to do such a simple thing. At least in XP/VX. Fine if your good with events and don't mind having hundreds of them in your map. If you're comfortable with it, that's good.

But it's a fact that events, even with an excellent antilag script, will slow down some process during the gameplay. You should also think of people with less powerfull computers and never put optimization asside.

I think the script I made is small enough and not complicated at all. Plus, it saves you a lot of time.
 

Jason

Awesome Bro

Dargor":3e2vm09i said:
Dirty way to do such a simple thing. At least in XP/VX. Fine if your good with events and don't mind having hundreds of them in your map. If you're comfortable with it, that's good.

But it's a fact that events, even with an excellent antilag script, will slow down some process during the gameplay. You should also think of people with less powerfull computers and never put optimization asside.

I think the script I made is small enough and not complicated at all. Plus, it saves you a lot of time.

Yeah I never said the script was a abad thing and it shouldn't be used, I was just replying to Glitchfinder after he said

"The real problem is that, in general, the community's eventing skills have atrophied since we started scripting."

And actually, I did most of my eventing on my old computer, which wasn't too good (512MB RAM, 128MB GFX Card, 1.7GHz Processor), and I didn't get any lag unless I made over 100 event based systems running simultaneously (Trust me, I tried that, lol)
 

JoshC

Member

Ok, well I don't know the codes to show scripts and events in their little box fields so I'm just going to do this regularly:

NPC Event:
@>Text: Do you want me to setup camp here?
@>Show Choices: Yes, No
: When [Yes]
@>Text: Alright here you go.
@>Script: $game_map.add_map_layer(1,2, \
: : Rect.new(0,0,25,15),0,0,true)
@>
: When [No]
@>
: Branch End
@>

It copies just fine but when I try to enter the event to transfer to another map that was copied for the door it gives me a Game.exe had to close... blah blah blah....; basically the Game.exe crashes
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top