• Announcements

    • RagingHobo

      Forum Upgraded!   07/17/2017

      We have successfully upgraded our forum to the latest version! Some things have moved around but don't worry everything is still there, we still need to find updated versions of the plugins we were using previously to restore everything to the way it was. There will be a running topic in the Feedback and Support in case you notice something wrong. Before you do so please clear your browser cache and close your browser completely to rule out a caching issue. Thank you for your patience during the outage and while we get everything back to 150%  

regendo

Member
  • Content count

    1,092
  • Joined

  • Last visited

  • Days Won

    3

regendo last won the day on October 26 2013

regendo had the most liked content!

About regendo

  • Rank
    Ruler of Worlds
  • Birthday 09/07/1995

Profile Information

  • Gender
    Male
  • Location
    Germany
  1. That does sound weird but I think I know the culprit. I'll get back in touch with you when I've worked on this.
  2. You can mark a battle as "can be lost" when you create it. That way, losing the battle will return you to the normal map where the battle started (and then you can do some eventing stuff that advances your plot). If this "can_lose" flag is set, my script shouldn't do anything. Edit: You can set this flag in the "Battle Processing" dialogue. I only found a spanish screenshot of this on google but it's the check at the bottom that translates to "continue if the group loses".
  3. Sorry for the late reply, getting my internet access back took a while. These will be additional scripts added in the Materials section, just like any other script. They will overwrite or add to a lot of the default stuff but I won't replace the default scripts. Once a significant amount is complete, I will upload a demo that contains a working set of the scripts. As for the database, I currently do not intend to modify it in any way and have not read up on how to do so either. Instead, I am going to link stats like Dexterity to the database through notetags. I have not yet decided if I'm going to write my own notetag script eventually; for the time being I'll depend on Mephistox's reader as I have before.
  4. Hello there. Please excuse formatting, I am writing this from my cellphone because the internet died 30 hours ago and vodaphone can go and ... violate this forum's rules of conduct with bad words that they're making me say. I am in the process on creating a sort of developer's toolbox for Fifth Edition. Imagine something like RMXP's Pokemon Essentials. Fifth Edition of what? Well, I'm afraid you'll have to find that out by yourself. As far as I understand it, I am allowed to do and release this even though there is no official licensing for 5E yet because of the OGL back from 3E. However, I apparently am not allowed to affiliate myself with that game series' brand name so I'll do the same as Necromancer Games did recently and just call it Fifth Edition. I am sure someone will tell you what it is anyways. So 5E is cool and all, but what exactly is this about? It is my intention to release a script and a demo that allows you to create Ace games similar to fifth edition campaigns. I will give you the mechanics and a short demonstration, no content and especially no content, released for fifth edition. It is not my intention to compete with fifth edition - not that I would be able to anyway. There's no way a singleplayer ace game developed through this toolbox will be even half as fun as a session with friends and real dice. If you're interested in this toolbox, buy the four releases of fifth edition so you get some content ideas and a deeper understanding of the mechanics. Enough of that talk. Let's get to the script. The script is available in its latest state on github, as always ( https://github.com/regendo/rgss3-scripts/tree/master/Fifth%20Edition ). So far, I have implemented lots of stats and the dice mechanics. I really wanted to use "1d20+3" syntax for skill formulas but apparently ruby interprets that as an invalid decimal tag for floats or something like that. So for now it's "r1d20 +3", perhaps I'll find some way to get around that. The dice rolls already work in combat and in script calls. The attributes should also work but they haven't been linked to the actual game yet. I am planning to cover the following areas eventually. * Stats and Dice * Character Sheet * Spellcasting * Movement and Initiative * Line of Sight and Vision * Actions, Damage, Death * Open World Combat * Enemy AI This structure will likely change during development. Also I can make no promises that all parts, especially the later ones, will be completed. This is a project of ridiculous scale. This thread is in the Ruby School for Thought for two reasons: because I can't post it as a complete script yet and because I want feedback! So please; discuss, advise, tear it to shreds (on second thought, perhaps not). The more feedback, the better the script will get! (Fifth Edition/5E and Third Edition/3E both belong to Wizards of the Coast, not me. I have heard they do not feel responsible for the consequences of splitting up the party, sticking appendages in the mouth of a leering green devil face, accepting a dinner invitation from bugbears, storming the feast hall of a hill giant steading, angering a dragon of any variety, or saying yes when the DM asks, “Are you really sure?â€)
  5. You're right. I haven't used ruby in a while and tried to do it from memory, I should have looked it up on google in the first place. I'll edit the post above.
  6. It should be the same concept. In the method that would equip an item, do something like the following pseudocode: if ( (actor == that actor you want to restrict) && (item == that item you want to restrict)) do if (actor has item xyz equipped) do // you could also check a variable or switch, or check if something is in the inventory equip it else popup window with error message // alternatively, play a buzzer sound or just don't do anything return end else equip it // this is the default case if you don't restrict that item-actor combination end I can't actually code this for you right now because I don't have Ace installed atm and do not have a local copy of these scripts but it shouldn't be too difficult to do so yourself. Since you seem to have a lot of different cases of this, using switch-case constructs would probably make the code easier to read. Something like case actor when $game_actors[0] case item when $game_items[1] // ... when $game_items[54] // ... end when $game_actors[1] case item when $game_items[42] // ... when $game_items[123] // ... end end Edit: If you want to restrict whole categories of weapons (all swords, all greataxes, etc) I believe there is an event command for that.
  7. You'll need to check for that condition before changing equip. Your options are to either check that in the scene you can change equip in (e.g. in your inventory) or directly in the method that changes equip (in Game_Interpreter, you should use an alias here). The second one might break compability with some scripts but is an easier solution if you have multiple scenes in which you can change your equipment. Both will not actually make it impossible for your actor to wear both a sword and that ring - they will just make it impossible to equip the sword when you wear the ring and vice-versa. If for some reason your character ends up wearing both, they will continue to do so until they unequip one of these.
  8. Also, if you want it outside of sprintf(), you can do something like (unless floating point inaccuracy decides to hate you) fl = 1.654 # ... a = (100 * fl).to_i / 100.0
  9. nil is the single instance of NilClass. If an object is nil, it doesn't exist / hasn't been initialized. If you know null, that's similar to it. As you might have noticed, everything (or at least most things, I don't know if this really applies to everything) in ruby can be used in comparisons (and by that I mean && (and) and || (or)). For example, in ruby you might see code like var = other_var || 0 This assings a value to var. It assigns other_var if that can be interpreted as true, and assignes 0 otherwise. So what are the possible values of var after this line? Either true or 0, right? Wrong. I don't know from this context what it will be, only that it definitely won't be nil or false, or anything else that behaves like false. As stated above, everything can be used in comparisons like && and ||. For this, most objects act like they're true. A few act like they're false, including nil. How they behave is always specified in that object's class or superclass. You can check if an object is nil by calling that object's nil?() method. (Edit) The objects true and false of TrueClass and FalseClass respectively behave like their names say, of course.
  10. There's also a different way to do this: ary.each do |elem| do_something_with_said_element end This is an each-iterator. It iterates through every element of ary one by one. The current element is called elem and can be referenced as such. For the current element, the iterator carries out every statement between |elem| and end. This is the same, just a different way of writing it ary.each { |elem| do_something_with_said_element } It basically works like this: i = 0 while(i < ary.length) do elem = ary[i] # gets the current element # do something with the element i = i + 1 # increases i so that next time we get a different element # also makes sure this loop will end eventually end
  11. You could say something like text = eval(Yomachi::npc_id + "_" + Yomachi::text_1) # or if you're already inside a string text = "#{eval(Yomachi::npc_id + "_" + Yomachi::text_1)}" # eval() evaluates a code stored as a string. You can imagine this as stripping away both # " marks and then just reading it as code. #{doStuffHere} can be used inside strings to # execute code (otherwise you would just print "$alfred_trait").
  12. I have an idea what the issue might be. Your global variables haven't been loaded from the savegame yet. I think this should work better. def draw_chapter(x, y, width, align) vars File.open(DataManager.make_filename(@file_index), "rb") do |file| vars = Marshal.load(file)[:variables] end words = Soul_Save_Chapter::Chapter_Display::Chapter_Words[vars[Soul_Save_Chapter::Chapter_Display::Chapter_Variable]] if(words) self.contents.font.color = normal_color self.contents.draw_text(x, y, width, height, words, 2) end end It loads the $game_variables array from your savefile into a local variable (can't load it properly into the global one since this will also happen while you are playing the game and accessign the save/load screen). It then finds the required variable, locates the corresponding string, and draws it if the string is existant. I haven't really used ruby in a while, but if memory serves me right, you don't have to worry about ArrayIndexOutOfBounds (you'll just get nil instead) and if() actually is if(stuff is not nil and not false either). Also, why are you printing the same stuff either once or twice depending on the save game existing?
  13. There are two possibilities to "store" variables so that their content doesn't get lost between game sessions. Edit the load and save methods so that your stuff is saved and loaded, too. Have your variables exist within objects that already are being saved and loaded by default.
  14. I couldn't find a .equip? method in the script editor, so that's most likely your problem. value = apply_guard(value)/2 if self.guard? && self.armors.include?($game_armors[111]) Edit: Assuming that self is a Game_Actor object.
  15. It should be something along the lines of $game_party.members[member_id].state?(state_id)