Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Utility: RPGenerator v0.7.23 - Build your own RPG in Codea

1235

Comments

  • Posts: 391

    Updated RPG and RPGenerator. A lot of additions to the player table have been made to get it ready for an actual RPG. Added the ability to change between party members, new PartyMember parameter will let you test this.

    Now that those changes have been made, I can continue to finish the game menu and then easily do a status menu to display all the new stats. Equipment menu after that will be a bit more difficult as it will need sub menus of its own like the inventory menu. Then I will start to make a shop menu template. Once all menus (except for save/load game, load confirm, config, and help) are completed, I will release RPGenerator as v0.8.0, but in the meantime, expect a bunch more v0.7.x updates, hehe.

  • @Slashin8r Hi,

    A little request, Could you add a few more maps in the next update.
    Because i cant seem to find the right way :(

  • @Slashin8r another question, you are a expierenced programmer right?
    Is java a good code to learn?
    And is it easy to learn?

  • Posts: 391

    @Jessevanderheide, if you're looking for a good programming language to learn I suggest C# since it is basically a combination of C++ and Java. It has the wide range of capabilities that C++ has as well as the user friendly syntax of Java.

    As for the maps, I will add a 3rd map that you can access by going through the new door I added on the 1st map. It will demonstrate how the inside of a building may look. Adding a new map takes a few steps:

    1) Create the new map, usually by copying another map (I have a blank map template saved in a text document that I use).


    2) Create a new teleport event that links to the new map.


    3) In the events table of one of your previous maps, add the new event I'd somewhere so that when you step on that tile the teleport occurs.

    Hope that helps. I think I may have forgotten in a previous post to tell you to add the new event onto one of your previous maps.

  • @Slashin8r thanks that will really help me out! :)

  • @Slashin8r but what us the code for the teleport event?

  • edited July 2013 Posts: 391

    @Jessevanderheide, you would just need to copy one of the events I currently have in the events table. A sample event for you here:

    function loadEvents()
        local events = {
            { type = "teleport", map = 2, x = 10, y = 10 },
            { type = "teleport", map = 1, x = 10, y = 10 },
            { type = "popup", text = "Popup Event Example. Move left to teleport." },
            { type = "entrance", text = "Tap the screen to enter this location.", map = 2, x = 10, y = 10 },
            { type = "teleport", map = 3, x = 5, y = 15 },
            { type = "teleport", map = 4, x = 1, y = 1 }
        }
        return events
    end
    

    Above, I added 2 teleport events to my default list of events. Now to use those events, you would place their index number on a map. Their corresponding indexes would be 5 and 6, so if I want map1 to teleport me to map3, I would go to map1's events map located at the very bottom of the map1 tab, and I would add a 5 in there. Each of those tables that define a map would essentially be layers, with the events layer be the topmost layer, but it is invisible.

    In the two examples, you can see event 5 would teleport you to coordinates (5,15) of map3 while event 6 would teleport you to coordinates (1,1) of map4. These events are only triggered if you place them onto a map and then walk over the corresponding tile with your character.

    Edit: Hmmm, now that weather has been added, I'm thinking I could easily add a map event that would trigger weather. This would be useful if you would like rain or snow to automatically start to fall if a player were to walk into certain zones.

  • @Slashin8r i doesnt work now i get a error in the rpggenerator project on line 25 :(

  • edited July 2013 Posts: 391

    @Jessevanderheide, did you update all 3 projects? I made changes to CiderControls, RPG, and RPGenerator.

    Your versions should be: CiderControls v1.6.4, RPG v0.4.16, and RPGenerator v0.7.18

    Edit: I just noticed I never actually pushed out RPG v0.4.16 and did so now, hopefully that resolves your error.

  • @Slashin8r thanks i finally have 4 maps!

  • edited July 2013 Posts: 391

    @Jessevanderheide, nice. Now just wait until you have 100 maps, which is probably close to the minimum number of maps a decent sized RPG would have. 1 big world map, 10 or so towns with a few building maps each, and multiple level dungeons. Lots and lots of maps to make, hehe. That's a lot of those grid tables to stare at, lol.

    Once I get RPGenerator to v1.0 then the first step towards v2.0 will be adding in a GUI for map editing. That way you can actually see the maps you are building and the generator will fill those tables for you.

  • @Slashin8r Yep thats a lot of work! Thats a good idea, but i dont know if you can code it :/
    I think its a lot of work....
    When do you think you are gonna make items that you can pick up and equip?

  • edited July 2013 Posts: 391

    @Jessevanderheide, I'm currently working on the equipment menu. Hopefully will have something to show everyone by this weekend. Also trying to finish the game menu so it will show your current party members.

    Just a quick FYI. If you are envisioning your character swinging a sword on the map like an old school Zelda, then RPGenerator may not be the utility that meets your needs. I don't plan on making this for action RPGs, but for classic turn-based RPGs where you would have separate battle scenes and encounter monsters at random or even by walking into a monster sprite like Chrono Trigger and Chrono Cross (however a separate battle scene would still take place).

  • @Slashin8r thats a good idea seperate battlescenes are quite good in that game!

  • @Slashin8r do you know how to play sound in the menu?
    Because i make my own music.
    And i want to make it a bit more epic XD

  • Posts: 391

    @Jessevanderheide, I haven't looked into how Codea can play music yet, but I have seen a couple of other threads regarding this.

  • Posts: 437

    Check out this paper:
    http://www.gamasutra.com/blogs/MichaelCook/20130722/196678/The_Saturday_Paper__A_World_Just_For_You.php

    It should be a good idea to fit the generation of the world in a bigger but easy to understand structure ,like this graph
    http://www.gamesbyangelina.org/wp-content/uploads/2013/07/Screen-Shot-2013-07-18-at-16.27.12.png

  • Posts: 391

    @juaxix, that's a pretty neat concept, but I don't see it fitting too well in this project, at least not yet. Currently, the maps aren't procedurally generated. The only automation for the map generation is the auto-tiling. Making an algorithm to procedurally generate the map while at the same time storing key locations and events would be a whole other project of its own. This is something I may look into possibly after RPGenerator v2.0, but that may be quite some time away.

    I do like the idea of random generating maps, so I will definitely add that into RPGenerator v2.0 so you can start out with a randomly generated map and then customize it. I could then go even further and make randomly generated buildings (the inside of them), dungeons, caves, towns, etc. All of these would speed up the process of creating a world, but even with all the automation in world generation, having the autogenerated world create events that fit a custom storyline would still be extremely difficult. With a storyline being basically 90% of an RPG I wouldn't want to screw up something that important, hehe.

  • edited July 2013 Posts: 60

    Hey Slashin8r... When is the next update? I'm suffering from update withdraw.

    What are your plans for the polish on menu? I was thinking it would be sweet if when you opened the main menu it would pause but still show the game below it vs drawing empty space to the left. I know the menu is early in design so you may have thought of this or something even better.

    Update... I swapped the menu draw to be after the map and it does what I was thinking. Notice there is 0 FPS hit when running the menu that way. I get a small hit when it runs the other way. Not too sure why.

    
    function draw()
        if imageStatus ~= "Ready" and imageTable ~= nil then return end -- this line must be at the top of draw()
        background(75,75,75,255)
        
    
            drawMap()
            
                if currentMenu ~= 0 then
            drawMenu(menus[currentMenu])
        else
            
        end
    

    Only downside is a if statement will be made to not draw the game behind the main game title menu at start.

    Keep up the amazing job.

  • edited July 2013 Posts: 391

    @Aalok, I had a bunch of family functions this weekend so didn't get too much work done. I did add more to the game menu though. That blank space to the left was being saved for displaying the party members and in my current version I have filled it with party member faces and some info including their names, levels, current hp and mp, and then across the bottom of each party member will list their current status effects such as poison, blindness, etc.

    I do love the idea of having a paused map show below the menu, so maybe I will add some conditionals in the drawMap function to make sure it pauses when a menu is displayed and then I can make every menu semi-transparent.

    As for the next update, I think I will have something ready tomorrow. It will include the finished game menu and a status menu as well. Then I will work on the equipment menu and release that when its finished.

  • Posts: 391

    Updated RPG and RPGenerator. I did not get to the status menu yet, but I figured it would be worth pushing out this update which includes a completed game menu, except for status effects which will be displayed under experience.

    I originally thought it would be very easy to make these menus, but formatting the text to line up correctly is a pain. I really wish that textAlign would work for text that is on a single line instead of just for multi-line text. Because of this, I have to do a bunch of math for every single line of text I want to print on the menus.

  • Posts: 60

    Wow main menu looks sweet. I see where you were going now. Is there a way to scale all of the main menu options down? Everything seems larger then it really needs to be on a ipad.

    Thanks for the update. I'm going to play with it now.

  • Posts: 391

    @Aalok, I was trying to utilize the whole screen unlike games such as Final Fantasy Dimensions which cuts off part of the top and bottom (like watching HD on a standard TV) to make the menu smaller. In order to resize the menu, you will have to reshape the buttons as well. I tried using a simple scale and translate call to resize it, but it doesn't relocate the button touch areas and resize them.

    Once I finish all the menus I will make sure to add in some simple customizing variables to change things such as width and height on the fly.

  • edited July 2013 Posts: 391

    I updated RPG and RPGenerator.

  • Posts: 391

    Updated RPG and RPGenerator. Still no status menu, however, I did fix a lot of issues with the inventory menu and also added a back button. I also got the item sub menu info button working and info is displayed at the top of the inventory menu. You can have 2 different descriptions displayed for each item, info1 and info2. info1 is displayed when an item is selected and info2 is displayed when the item sub menu info button is touched. I am currently using info1 to show stat changes or a short description of the item and info2 is being used to show history or long description.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    @Slashin8r Looking great! I grab and check out every update!

  • Posts: 391

    @Briarfox, thank you very much. I wish I could make the menus look a bit snazzier without it lagging out, then it would look and feel more like an actual game, hehe.

  • Posts: 391

    Now to try and figure out how to sort the items in the inventory without having to rewrite the whole algorithm. I have a feeling this is gonna be a pain in the butt. I'm thinking I toss indexes into a table as I sort the items then use that new table to display the items. This will probably cause lots of problems with the sub menu... Not looking forward to it, lol.

  • Posts: 391

    I butchered the inventory menu already, lol. Time to revert back to the latest version and try again.

  • Posts: 391

    Ok, I think I got a better way to sort them. This time I physically sorted the actual tables (items and player.inventory) instead of trying to use another reference table. I use a variable to test whether or not the tables are already sorted so it doesn't sort it every frame. Now to make all the sorting algorithms using this format.

  • Posts: 391

    Ok, I have both auto-sorts working (by type and by name). By type sort is actually a 9-in-one sort in which it can sort to where each type will be moved to the top. Keep on touching sort by type button and it will tell you "sorted with 1-handed weapons at the top", "sorted with consumable items at the top", "sorted with key items at the top", etc., etc.

    Now, I need a way to do manual sorting. My initial thoughts are: you tap manual sort button, it highlights to let you know you are about to manual sort, then you select 1 item and then select another to swap their positions. Do you all think this is sufficient for manual sorting?

  • edited July 2013 Posts: 60

    Great update so far. Do you think a manual sort is needed? I think the auto sort will be enough any good RPG needs.

    I was wondering if we could set values for WeatherType, Light, and such at the individual map level? Would be nice to say if map4 always rains and set that there. The other idea I had was when the light is set darker 1 or 2, is there a way to have items like lamp post or fires exempt so they appear to glow in the night?

  • Posts: 391

    @Aalok, yep you can set the weather per map. You would have to remove my parameter for the testing of weather and make a weather variable in each map and then where I have it set the weather according to the parameter variable, change it from the parameter variable to match the weather variable using maps[currentMap].weather (or whatever you decide to call the weather variable).

    As for the torch light and light post light idea, I love the idea and will definitely look into this. I might have to render the dark effect into a mesh and punch holes in it where the lights would be. Currently it simply uses a black semi-transparent rectangle that covers the whole screen to make it darker.

  • edited July 2013 Posts: 391

    Ran into a small problem with the sort by name algorithm. I can have it sort the items table with no problem, but I never had it sort the player.inventory table so the item quantities are incorrect. How do I get a table to sort by using another table as the comparison?

    Edit: I'm almost thinking it would be best to just scrap the player.inventory table and put the item quantities in the items table.

  • Posts: 391

    I scrapped player.inventory and now the name sort works as well as the type sort.

    @Aalok I think I will still add a manual sort, I think it will be the simplest sort of them all since I just need to have it swap the chosen items.

  • Posts: 391

    Updated both RPG and RPGenerator. Inventory menu now includes 3 sort options: sort by type, sort by name, and sort manually. Sort by type allows you to bring each item type to the top, it is a 9-in-one sort button. Sort by name is a 2-in-one sort button allowing you to sort items alphabetically in ascending or descending order. Sort manually allows you to swap 2 items while it is selected.

  • Posts: 2,043

    @Slashin8r, WOW! I just updated from version 0.7.8 (Yes, I know, I'm waaaay behind), and the progress with the menus is phenomenal! Great work

  • Posts: 391

    @JakAttak, thanks so much.

    Been working on the status menu and should have it released some time tomorrow. After building the current menus I have now gotten pretty quick at making new ones. Also got a bit of the layout done for the party menu. I have an idea to utilize the same technique I used for manual sorting in the inventory menu for swapping party members.

  • Posts: 391

    Just got a website order today so I most likely won't be able to finish the status menu today. Will try to squeeze in some Codea time if I can, but money always comes first and this client is paying me in cash, woot!

    For anyone interested, here are links to the menus I am trying to simulate:

    Status Menu: http://yanflychannel.wordpress.com/rmvx/menu-scripts/status-menu/

    Party Menu: http://rpgmaker.net/scripts/65/

    Shop Menu: http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-shop-options/

    These are all Yanfly menus if you are familiar with RPGMaker Ace then you have probably used these before. Yanfly makes some awesome menus!

  • edited July 2013 Posts: 60

    Hey Slashin8r

    Can you please direct me where you set the font, line and fill color for the Main Menu? It seems like I can't find that for all of the other menus but the first one when the game launches.

    I looked into Menu tab in generator but I don't see a else if for m.MainMenu.

    
    
    menu1 = { name = "Main Menu",
        controls = {
            Label('RPGenerator', 112, 461, 912, 650, 125),
            TextButton('Resume', 312, 371, 712, 461, function () currentMenu = 0 end, 50),
            TextButton('Load Game', 312, 281, 712, 371, function () currentMenu = 0 end, 50),
            TextButton('New Game', 312, 191, 712, 281, function () currentMenu = 0 end, 50),
            TextButton('Help', 312, 101, 712, 191, function () currentMenu = 0 end, 50),
            TextButton('Config', 312, 11, 712, 101, function () currentMenu = 0 end, 50)
        },
    
    
  • 4) Open RPG and set RPGenerator and CiderControls as dependencies

    How do I do this? Is it simple?

  • Posts: 2,043

    @NetherDragon, when you are looking at the code for RPG, in the top right corner there should be a plus sign. Click on that and a list of projects will come up. Select both RPGenerator and CiderControls from that list

  • How do I do anything, as soon as I open the rpg file and run it, this is after the images have been loaded, any button I press just pulls up the same screen non of the menus work is this normal? D I have to code to be able to click new game help config ect.

  • edited July 2013 Posts: 391

    @NetherDragon, you may have to close Codea completely by ending its task (double press home button, tap and hold on Codea icon and then tap the minus to close it) and then restart. If you are referring to the main menu buttons all leading to the game starting, then this is just because I haven't finished any of those menus. The only completed menus are the main menu, game menu, and inventory menu. Menus such as help, config, load game, etc. have not yet been coded.

    @Aalok, most of the color scheme and font type is in CiderControls, I will add more variables to each initialize function like I did for fontSize with the textButtons. I will add in font, fontColor, fontHighlightColor, backgroundColor, foregroundColor, and highlightColor. I think that takes care of all the variables for complete customization.

    You could also manually set the variables in your setup function. Something like menu7.controls[1].font = font() would change the font of the first control in menu7.

  • edited July 2013 Posts: 391

    Here are the variables that can be changed manually and their default values:

        self.font = "HelveticaNeue-Bold"
        self.fontSize = 16
        self.textAlign = LEFT
        self.vertAlign = TOP
        self.background = color(219, 219, 219, 255)
        self.foreground = color(14, 14, 14, 255)
        self.highlight = color(101, 114, 153, 255)
    

    Currently fontHighlight color doesn't even exist and it automatically defaults to white. I will change that in the next release.

    Here is the order the colors are drawn:


    Foreground rectangle (the button border)


    Background rectangle (the button background)


    Foreground text

    If pressed, background switches with highlight and text color turns white (soon to be customizable).

  • edited July 2013 Posts: 4

    Found a bug!!! If you talk to an NPC and touch where the movement area is then it locks up and the character starts moving constantly in that direction if it helps i can try showing a screenshot if i knew how.

  • edited July 2013 Posts: 391

    @NetherDragon, nice find, thank you! I will fix this in the next release.

    Edit: Already found the solution. Will definitely be fixed in next release.

  • edited August 2013 Posts: 391

    Here is how the next release textButton will be initiated:

    TextButton:init(s, left, bottom, right, top, callback, f, fs, fh, ta, va, bg, fg, h)

    s, left, bottom, right, top, and callback are same as before

    f=font ("HelveticaNeue-Bold"), fs=fontSize (16), fh=fontHighlight (color()), ta=textAlign (LEFT, CENTER, RIGHT), va=verticalAlign (TOP, MIDDLE, BOTTOM), bg=background (color()), fg=foreground (color()), h=highlight (color())

    If you wish to use default value, set the parameter to nil.

    Edit: Label will also be called the same way. Here is the title for an example:

    Label('RPGenerator', 0, 461, 1024, 768, nil, "AmericanTypewriter-Bold", 130)

    Notice how callback is nil so it has no touch function. Now here is the same label but set to blue font color (font color uses foreground variable).

    Label('RPGenerator', 0, 461, 1024, 768, nil, "AmericanTypewriter-Bold", 130, nil, nil, nil, nil, color(0,0,255,255))

  • Posts: 391

    Updated RPG and CiderControls so that the new control parameters can be utilized. The new RPG build also has the fix for the bug @NetherDragon found.

  • Posts: 391

    I am officially becoming overwhelmed with the complexity of this project. I am going to take the rest of the week off from coding and try to make a detailed outline for the rest of the project. I need to figure out all the variables that will be needed for the whole project so I don't have to change them when I come across a new variable that is needed. Basically this means I will have to make the monsters table, mounts table, vehicles table, spells table, etc. and the variables to go with them. I am going to have to come up with an experience to level formula, and other formulas such as damage and healing. I think I will feel much better about the project when I get all of this out of the way, then finishing the menus will be much easier as all the information to be displayed will be taken care of.

Sign In or Register to comment.