Triple Triad - FF8 Mini-game

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Raizen, Jan 13, 2014.

    Tags:
  1. tiagoms

    tiagoms Veteran Veteran

    Messages:
    181
    Likes Received:
    4
    I wish this fix LoL
     
    #41
  2. RaZzi

    RaZzi My Peculiar Brother Veteran

    Messages:
    420
    Likes Received:
    206
    Location:
    Finland
    First Language:
    Finnish
    Yeah, it would be nice of you if you could share the fix! ;)
     
    #42
  3. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Sorry for the late reply, wasn't home yesterday.


    Ok, in the spoiler is all I did to fix the "?????" issue.

    At the card settings, make a new setting for every card you have.
    So, insert this line for every card, after the 'Image2' setup line:

    'Discover' => false 
    Do not forget to put a comma ( , )at the 'Image2' setup line's end or else you will get a tsymbag error!


    You will never need to change this line at any card setting, just leave it at false at every card (unless you want the card to be discovered at the start of the game without actually having the card in the player's inventory).


    After this, go to the Card Album script and find this line:

    if @card_number[index] == 0 
    Replace it with this line:

    if Config_Triple_Triad::Card[index]['Discover'] == false 
    Next, in the same script, find the line below:

    command = "?????" if @card_number == 0 
    Replace it with this:

    command = "?????" if Config_Triple_Triad::Card['Discover'] == false 
    Now, go to the main Triple Triad script and find this line in the gain_triad_card definition:

    $game_timer.total_cards[id] = 0 if $game_timer.total_cards[id] < 0 
    Just after this line add the line below:

    Config_Triple_Triad::Card[id]['Discover'] = true if num > 0 
    After this, let's head to the Win/Lose Scene script and find this line:

    if $game_triple_results[n] == 0 
    In this 'if' check, just before the 'end' line, add this line:

    Config_Triple_Triad::Card[$game_timer.npc_hand[n]]['Discover'] = true 
    In the same script, search for this definition:

    def take_all_npc 
    In this definition, just before the first 'end' line (so, inside the 'for n in 0...5' command), add this line:

    Config_Triple_Triad::Card[$game_timer.npc_hand[n]]['Discover'] = true 
    After that, in the same script, find this:

    $game_timer.total_cards[@npc_hand[@index]] += 1 
    Just below this, add this line:

    Config_Triple_Triad::Card[@npc_hand[@index]]['Discover'] = trueAnd the last edit (hopefully for real this time! >.>), go to the Card Shop script and find this line:
    Code:
    $game_timer.total_cards[$triad_shop[@old_index]] += 1
    Add the following line below it:
    Code:
    Config_Triple_Triad::Card[$triad_shop[@old_index]]['Discover'] = true
     
    This should fix that ????? issue.


    Note that this is not the most elegant fix, but it works. :)



    @tiagoms


    You should take a look at the fix I posted here, because the fix I sent you in PM did not consider the discovery method when the player wins a game.


    The win/lose scene uses a different method of giving the cards to the player, so it was necessary to update those methods with the discovery states too.


    Also fixed an issue with the script call making cards discovered, even if you just took it from the player, not gave it.


    With this, all the cards name's will stay discovered once a player got a card, and will stay discovered, even if the player loses all of that card type in the game.


    Edit:


    Forgot the shop scene, opss! Added the fix for that too.
     
    Last edited by a moderator: Sep 8, 2014
    #43
    tiagoms likes this.
  4. RaZzi

    RaZzi My Peculiar Brother Veteran

    Messages:
    420
    Likes Received:
    206
    Location:
    Finland
    First Language:
    Finnish
    Having trouble with this part "Now, go to the main Triple Triad script and find this line in the gain_triad_card definition:". There is no def gain_triad_card or anything similiar with "gain". When searching with "$game_timer.total_cards" it finds this line

     
      def self.total_cards    a = 0

        $game_timer.total_cards.dup.each{|card| a += card}

        a += $game_timer.hand_deck.size

        return a

      end

     

    EDIT: Found the def gain_triad_card in the second page of this thread. It's not in the main posts script.
     
    Last edited by a moderator: Sep 8, 2014
    #44
  5. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    If you could not find the gain_triad_cards definition, that means that you are using v1.0 version of the script, which is outdated and misses many great features. I suggest you to update to v1.1 which can be found at the link I posted a few posts before. It is a portuguise version, but even if you don't understand that language, it is not hard to understand the new things there.

    Also my fix was made in that version, so there is no guarantee that it will work in v1.0 version.
     
    #45
    BCj likes this.
  6. BCj

    BCj Veteran Veteran

    Messages:
    1,438
    Likes Received:
    677
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Is there any way to change the BG when you're playing tripple triad vs a npc? I think it's one of the battle themes now, but I'd like to play my own custom bg music.
     
    Last edited by a moderator: Sep 12, 2014
    #46
  7. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    You can change the BGM for every single enemy in the enemy settings script.


    Just look for the 'Music' option, you can define your BGM for the battles there for each enemy separately.
     
    #47
    BCj likes this.
  8. BCj

    BCj Veteran Veteran

    Messages:
    1,438
    Likes Received:
    677
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Which parts got changed in the portuguese 1.1 version? Makes it a bit easier for me to know what to copy (and what not)
     
    #48
  9. Raizen

    Raizen Veteran Veteran

    Messages:
    194
    Likes Received:
    202
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Almost nothing, just some adds in how to gain some cards and stuff like that, not really that big change xD.

    I'm kind of away from maker :( , but I'll try to come back and get everything updated :)
     
    #49
  10. BCj

    BCj Veteran Veteran

    Messages:
    1,438
    Likes Received:
    677
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    #50
  11. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Recently I found out that this script is still being updated by Malagar, a member of the rpgmakervxace.net community.


    When I found that out, I decided to add something to the script too.


    I originally wanted to put this up there, but that forum got a rather small upload limit per user, so I tried to upload it on mediafire, but that one got an error on 97% after 92 minutes of praying, so I gave up on that too.


    I must say that this forum uploader is pretty cool and stable thou. :)


    So, onto the news!


    The demo below contains:

    All of Malagar's modifications:
    ~ Element rule


    ~ Rarity texts instead of numbers (originally only in the popup window, I added this to every Triple Triad scene)


    ~ Card descriptions (further modified by me thou)


    ~ Option to display card numbers and elements on the card image (scripted) (I added a switch to disable the numbers but keep the element icon display) - I am not sure who made this, but I haven't seen this in the v1.1 version, so I include it here, but if it is not made by Malagar, please let me know


    ~ Duels fought, duels won, duels lost and duels undecided (draw) variables which are automatically update themselves after each duel


    ~ Cards are now in a new sub-folder named "Cards" in the Triple Triad folder


    ~ Element setup for boosters


    ~ Booster popup with rarity and card image shown


    ~ The selected card's name is displayed on the bottom during duels


    ~ New description window on the Card Shop scene (removed by me thou)


    ~ And probably some more things I forgot or don't know about.


    All of my modifications:


    Huge visual changes for the:


    ~ Card Album:


    Completely reworked, two versions available:


    - The regular version uses card names to display the card list, like a normal command window


    - The icon version displays an icon for each card instead of their names making the card album as compact as it can be. Sort of like the real card album from some FF games (FF9 comes to my mind first).


    - New statistic window that can show many statistic information


    - Due to the amount of information shown, it is recommended that you get at least 640x480 resolution for your project or try to make it even more compact if you can. On 640x480 resolution, with the default setup, you can show 90 cards at once in the card selection window!


    ~ Card Shop:


    - Reworked to look like the card album.


    - Removed Malagar's description window. The card's description will show up in the same window where all the other info is shown


    ~ Booster Popup:


    - Centered stuff, the window's width will now scale to it's contents, so no more card names being cut down ever again!


    ~ Rules Window:


    - Not really reworked, but made it fully customizable for the developer's pleasure. Also added some visual stuffs.


    ~ Card Name Window (during duels):


    - It will now scale in size depending of the card's name.


    Tons of new settings (mostly for visuals)


    ~ All window's properties


    ~ Text color options for system text, rarity texts, collector's title texts, and for some other texts


    ~ Color options for every visual eye candy I made


    ~ Windowskin option


    ~ Table's position setting with option to always center the table


    ~ And more!


    New features:


    ~ Collector's Title and XP:


    - Fully configurable XP gain settings, title names and title colors


    - Can be shown in the Card Album


    ~ Discovery status for cards and discovery rate statisctic


    New script calls:


    ~ For checking if a player got a certain card in his/her hand equipped


    ~ For locking a card in the player's hand


    ~ For making the enemy choose the card what you want him/her to choose if he/she won instead of a random choosing when the winning condition is set to "One"


    ~ For checking the player's collector's title and xp


    ~ For using the player's current collector's title and xp in text messages


    Bug fixes:


    ~ Fixed some crash issues on the Card Shop scene


    ~ Fixed FPS drop issues on the Card Shop scene when selling cards


    ~ Fixed the description text, it now shows the real description when selling cards


    All materials needed for the Icon Version of the Card Album:


    ~ Moghunter's Menu Cursor script (with the images needed for the script)


    ~ Yanfly's Core Engine (for higher resolution - optional)


    ~ Icon set with the default card icons used in the Card Album (card icons made by me)


    Halrawk's awesome cards (if by any chance you want them removed, just say so)


    My custom windowskin which I forgot to remove... Ohh, well, use it if you want... Credit for that must be given to Aindra, because I used the samples provided by him and assembled my own windowskin, but he was the one who created the windowskin part images (at least I think).


    New event on the map to demonstrate the new script calls and their usage (hint: the girl wants a "Spider" card :p )


    Card settings made for all of Halrawk's cards and around 80 dummy copy/paste cards, forgot to remove them, sorry! :p


    I guess this is it, but who knows, maybe I forgot something. o.o
    I would gladly put some screenshots here, but I reached the upload limit, so that won't happen. But if you want to see some screenshots of my scene modifications, you can find some here:


    http://www.rpgmakervxace.net/topic/21183-triple-triad-ff8-mini-game/?p=194879


    You can also read about the new changes made by Malagar and some more detailed information of my scene modifications.


    And well, here is the demo itself:


    (The demo here is outdated! Look for v1.1.8 a few posts below this one in this topic!)


    Triple_Triad_Demo_v1_1_4.rar


    If you find any bugs you can report them to me.
     

    Attached Files:

    Last edited by a moderator: Dec 19, 2014
    #51
    Dymdez likes this.
  12. BCj

    BCj Veteran Veteran

    Messages:
    1,438
    Likes Received:
    677
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Sixth, something weird is going on. The more cards I gained the lower my XP and Rank became, surely that can't be right :p
     
    #52
  13. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    It is right.

    That is to force the player to sell lower ranked cards, instead of stacking them infinitely.

    The more rare cards the player get, the higher the collector's xp becomes.

    Effectively, if I manage to implement a cards owned limit (like in FF9, I guess? 100 cards max), then the max XP can only be reached when the player got only 1 of all card types if the settings are configured in the right way.

    This was my original intention.

    It shouldn't be hard to make a max card limit setting, so I will start it after my dinner.

    And I will put in a new setting for this rarity scaling feature to be enabled or disabled.

    Did you already download the demo and played it? WTFruit, I uploaded it only a few minutes ago. :D

    Ohh, I just checked and used a wrong variable for the scaling feature. o_O

    Instead of dividing the rarity sum with the card types owned, I divided it by the number of cards owned. And I even put it like this in the description of the setup, lol.

    It must have been pretty late at night when I made that. :D

    Gonna fix it in a few minutes!

    On another look on my xp formula, no, it is setup in the right way. dayum, I need a coffe! >.>

    But if you want to switch the rarity scale feature off, here is what you need to do:

    Make a new setting in the card album script like this:

    Code:
      # Enable or disable the rarity scaling feature here.  Rarity_Scale = true
    Then head to the main script and search for this line:
    Code:
    @xp = (@xp * final_rar_mul).to_i
    Replace that line with this:
    Code:
    @xp = (@xp * final_rar_mul).to_i if Config_Triple_Triad::Rarity_Scale == true
    Won't upload a new demo for this now, sorry! :p
     
    Last edited by a moderator: Nov 9, 2014
    #53
    Dymdez likes this.
  14. BCj

    BCj Veteran Veteran

    Messages:
    1,438
    Likes Received:
    677
    Location:
    NL
    First Language:
    Dutch
    Primarily Uses:
    N/A
    Ah yeah I happened to be online. I'll try the fix tomorrow :)
     
    #54
  15. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Finally managed to make a new demo with even more features and bug fixes!

    The new demo adds the following things (v1.1.5 change log):
    - Visual Changes:
    ~ Added a new card indicator. Whenever a player sees a card not discovered or not owned (configurable), a picture will be shown on the card.Can be enabled/disabled.
    ~ Added card paintings for elements and numbers on the win/lose scene.
    ~ Added a new window to the Card Shop scene which shows the total amount of cards the player has.
    ~ Added a color option for the total amount of cards, which will color the text in the new window on the Card Shop when the limit has been reached.
    ~ Gold window in the Card Shop scene has been redesigned.
    ~ The description window in the Card Album will now update wherever your cursor is, regardless of which window you are in.
    ~ Added proper buff icon display when a card is on an elemental field.By default, this was missing when the card has been flipped in the duel.
    - Functional Changes:
    ~ Added an option to enable/disable the rarity scaling feature for the collector's xp.
    ~ Added an optional script for making the Card Album accessible from the menu itself.
    ~ Added an option to limit the number of cards the player can hold at once.Made one limit for total cards and one for card types.
    ~ Added a discard card feature to use with the card limit feature.
    ~ Added a disable switch for button triggered duel requests to prevent some events from malfunctioning. Use it in eventing if you ever need.
    ~ Made a new scene which appears if the player gains some cards when there are no place for them in the album.
    ~ Added maximum element field limit. By default, there is a high chance that you will get the board full with elements. I don't like it that way, so I changed how the board's element field setup behaves and added a max limit.This limit means that you won't see more than that many elemental fields on the board, but you can see less than that, so it is still random.
    - New script calls:
    ~ For checking exactly how many cards the player holds in his hand deck from a certain card type.
    - Demo Events:
    ~ Added some events to demonstrate the new script calls and features.
    - Bug Fixes:
    ~ The BGM at duels will start now even if you switch off the rules switch.
    ~ Card names for the enemies will not show up in the duel anymore if the open rule is not present.
    ~ Fixed card paintings for elements and numbers in the duel.
    ~ Fixed a non
    -visible bug with the collector's XP. It should now show the realXP in real time.
    ~ Fixed cancel sound not playing when exiting the Card Album when simply viewing cards and not initiating a duel.
    ~ Fixed buff icon display when a card is on an element field. It should show the real icon (increase or decrease) from now on.
    ~ Fixed another issue with the element buff/debuff icon in the duel.The increase/decrease icon will now show only for the card placed on the element field. By default, if the player got more than one card from the sametype, it painted all the cards from the same type with the increase/decrease icons. This will not happen anymore.
    ~ Fixed an issue with the card's stats when placed on an elemental field which gives negative effects. If the card's stat became 0 on any side, that card could not be taken from the sides where the stat became 0.Now these cards can be taken from any sides. Needs a bit more testing to ensure that no bugs are created after the fixing, but so far, it works.
    ~ Certain scripts with custom menus make the menu cursor a bit confused and it will spawn at some not so aesthetic places. Added a little patch to fix this behaviour. The patch was made by Theo, not by me, so credit goes to him. I just added some additional comments in it, in case if someone would not like to show the menu cursor outside of Triple Triad scenes.
    - Misc.:
    ~ Added a change-log.
    ~ Updated the credit list.

    And a few more things (v1.1.6 change log):
    - Visual Changes:
    ~ Changed the text message box which appears on the map when the player gets a card which can not be taken without discarding some cards from the album. It is now a regular popup window. The window's position and size can be adjusted at will. Message codes should still work in it.
    ~ The popup window for gaining cards will now show up only once if the player got multiple cards from the same type instead of showing up for every single card. This is only valid if you give the player more than 1 card with 1'gain_triad_card' script call. You can still show the popup window for every single card if you want by adding them 1 by 1 with separate 'gain_triad_card'calls.
    ~ The popup window for gaining cards will now show the quantity gained too if the option is enabled in the settings.
    - Bug Fixes:
    ~ Fixed the gain_triad_card script call. It added cards even when the value was a negative number, so it wasn't possible to make players lose cards.I forgot that it can be used to take cards instead of adding them too, sorry!
    ~ Fixed the background option on the Card Shop scene.
    - Misc.:
    ~ Credit list updated. I forgot the most important "person", lol.

    And some more things (v1.1.7 change log):
    - Audio Changes:
    ~ Added ME setting to play when the duel ends in a draw.
    - New Features:
    ~ Added a new win condition named "Random". The winner will take a random card when this win condition is used, regardless of who is the winner, the player or the opponent.
    - New Script Calls:
    ~ For making the player choose a certain card instead of a random selection when the win condition is set to "Random".
    ~ For checking if an enemy got a certain card in his/her hand equipped or not.
    - Demo Events:
    ~ Added a new event to demonstrate the new script calls and features. Excuse the "complex" event.
    - Bug Fixes:
    ~ Fixed a crash issue on Win/Lose scene.

    Time for an update (v1.1.8 change log):
    - Visual Changes:
    ~ Added settings for the card description visuals. How could I miss this? o.o
    ~ Added separate card icons for each rarity. Now you can have different icons showing up in the card album for each rarity. Only affects the icon version of the card album, obviously.
    ~ Added a confirmation window for the win/lose scene. It appears when the player selects a card after winning if the win condition is "One".
    ~ New visual options added for the confirmation window on the win/lose scene.
    ~ New options for the rules window. Now you can choose what to show and what not! In case you don't want to use the elemental rule ever in your game, you might as well remove it from the rules window, right?
    - Audio Changes:
    ~ Added SE options for several menu sound effects.
    - Functional Changes:
    ~ Reworked the collector's XP setup. It works in a different way now. People will like the settings more like this, I guess.
    ~ Instead of always turning on a switch to enable the rules window and the card paintings, you can now use 0 for their settings and they will always be enabled. That's plus 2 switches spared, right?
    - New Script Calls:
    ~ For gaining or losing all cards at once. This is for testing purposes. Can help with properly setting up the collector's XP and title settings.
    ~ For gaining or losing all cards from a specific card type. Same purpose as the above one, debugging, testing.
    ~ For testing and logging different XP configurations. This one is a developer's tool to help the makers set up the XP how they want without play-testing the game hundreds of times. Useful tool if you want to know how much XP the player can gain at max on a specific setup. Only useful if you use the card limit settings thou.
    - Bug Fixes:
    ~ Fixed several visual bugs on the win/lose scene.
    - Misc:
    ~ Made the statistics window's page setup a little more user friendly. This won't affect anything or add anything new, only the setting looks a bit different now, it should be more clear what you edit now.
    ~ Added FenixFireX's Plane Fix script to boost performance on the map. Just to advertise higher resolution projects some more!

    And here is the demo itself (updated yet again... and again):
    Linky: http://www.mediafire.com/download/k8hmdgslicwn6rx/Triple_Triad_Demo_v1_1_8.rar
    (Thanks Hudell for the link! My version on my laptop is full with irrelevant scripts now, so that link is a godsend!)

    Known Issues:
    - None that I know of... yet. :p

    Waiting for bug reports of any kind! I am sure I forgot some things. :D
     
    Last edited: Feb 6, 2017
    #55
    tiagoms and Dymdez like this.
  16. Dymdez

    Dymdez Newbie-in-Chief Veteran

    Messages:
    752
    Likes Received:
    148
    Location:
    Western Massachusetts
    First Language:
    English
    Awesome - I'm on it :)
     
    #56
  17. RaZzi

    RaZzi My Peculiar Brother Veteran

    Messages:
    420
    Likes Received:
    206
    Location:
    Finland
    First Language:
    Finnish
    Oh sheep. Had already made looots of customization and changes to that script. :(
     
    #57
  18. Dymdez

    Dymdez Newbie-in-Chief Veteran

    Messages:
    752
    Likes Received:
    148
    Location:
    Western Massachusetts
    First Language:
    English
    Show us - we are all about making this a big effort - dont be sad lol
     
    #58
  19. RaZzi

    RaZzi My Peculiar Brother Veteran

    Messages:
    420
    Likes Received:
    206
    Location:
    Finland
    First Language:
    Finnish
    Well, this new version adds so many good new features (some of them which I already had) so I have to compare these a bit and see.
     
    #59
  20. Sixth

    Sixth Veteran Veteran

    Messages:
    2,130
    Likes Received:
    798
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Me too, than Dymdez accidentally showed me Malagar's version, so I started to work on the script and shared my mods too.And yeah, I managed to find a bug which I created. >.>

    I broke the 'gain_triad_card' script call. It is not possible to take cards from the player, and to top it off, it will even add cards when you use a negative value for the amount gained. :D

    To fix it, replace the 'def gain_triad_card(id, num)' definition (the whole definition) in the main script with this:

    #-------------------------------------------------------------------------- # * gain_traid_card(id, num) - !!UPDATED!! #-------------------------------------------------------------------------- def gain_triad_card(id, num) old_total = $game_timer.total_cards[id] old_disc = $game_timer.card_discovery[id] if Config_Triple_Triad::Max_Cards_Types != 0 && Config_Triple_Triad::Max_Cards != 0 num.abs.times do if num > 0 if $game_timer.total_cards_owned < Config_Triple_Triad::Max_Cards && ($game_timer.total_cards[id] + $game_timer.hand_cards_check[id]) < Config_Triple_Triad::Max_Cards_Types $game_timer.total_cards[id] += 1 $game_timer.card_discovery[id] = true if num > 0 else $game_timer.card_overflow[id] += 1 end else $game_timer.total_cards[id] -= 1 $game_timer.total_cards[id] = 0 if $game_timer.total_cards[id] < 0 end end if $game_timer.total_cards_owned < Config_Triple_Triad::Max_Cards && ($game_timer.total_cards[id] + $game_timer.hand_cards_check[id]) < Config_Triple_Triad::Max_Cards_Types SceneManager.scene.card_triad_popup(id, num, old_total, old_disc) if num > 0 && SceneManager.scene_is?(Scene_Map) end else num.abs.times do if num > 0 $game_timer.total_cards[id] += 1 else $game_timer.total_cards[id] -= 1 end $game_timer.total_cards[id] = 0 if $game_timer.total_cards[id] < 0 $game_timer.card_discovery[id] = true if num > 0 end SceneManager.scene.card_triad_popup(id, num, old_total, old_disc) if num > 0 && SceneManager.scene_is?(Scene_Map) end if $game_timer.card_overflow.max > 0 && $game_timer.overflow_flag == false Sound.play_buzzer $game_message.position = Config_Triple_Triad::Message_Full_Pos $game_message.add(Config_Triple_Triad::Booster_Full_Text) $game_timer.overflow_flag = true Fiber.yield while $game_message.busy? SceneManager.call(Scene_Card_Overflow) end end
    Sorry about this, I forgot that we can use this script call to take cards from the player too instead of only adding them! >.>
     
    Last edited by a moderator: Nov 25, 2014
    #60

Share This Page