UFC Tower Defense

● ARCHIVED · READ-ONLY
Started by UnwantedFriedChicken 65 posts Page 2 of 4 View original ↗
  1. estriole said:
    nice update... like the new UI... but maybe the text for the tower name could be changed to two lines if they are too long? somehow the text become too small...
    "if possible" tooltip when hovering the tower UI would be awesome... (if using tooltip mode i think there's no need for the tower name above... because the tower name could be seen on the tooltip).

    and like @wrigty12 above said... you can add more on screen UI for "quick tower shop" and maybe even another on screen UI to "start the wave" (instead of needing to go to that lever :D).

    also somehow we cannot open the regular menu anymore because right mouse click is tied to the "cancel tower"... still hoping this tower defence can be added as minigame :D... which means tied to some switch to disable / enable the tower defense mode...

    i also did not see the aura tower in the demo link (web browser) above >.<... maybe i missed it?

    but this is a great job... hope this plugin can evolve more :D.
    Oh right! I think it's easier to make tooltip rather than multi line, I'm will add it later
    Shop button maybe for now I will just add button for scene shop, and for the start the wave I want to still stick to plugin commands I think it's easier to customize it like when you want using timer to automatic spawn, or maybe attach to custom UI

    Oh I forgot I use cancel trigger so I disabled open menu, I will fix it
    Switch for tower defense mode is nice, I think I will try add plugin command to stop & destroy any update/function from tower defense

    Aura tower -> buy novice mage -> upgrade white mage

    wrigty12 said:
    Yeah, now that you mention the menu thing @estriole , I thought that Main Menu was just disabled via an event, but I can't seem to find that anywhere?

    If I just make a brand new map in the demo and start the player there, right mouse click works fine HOWEVER, {Bug} I have to push the X/Cancel keyboard button Twice in order to open the Main Menu, instead of once..

    I'm sorry I forgot I used $gameSystem.disableMenu() in script instead using event I will fix it later
  2. It would be nice if enemy or monster would have armor or resistance to the tower effect it makes it more fun and challenging. this is just a suggestion
  3. Jrrkein said:
    It would be nice if enemy or monster would have armor or resistance to the tower effect it makes it more fun and challenging. this is just a suggestion
    Ohh like centrain enemy immune to cold effect, sound like fun I will add it later
  4. So I got to a point in my game where I wanted to just throw this into it to see if there are any incompatibilities. In order to do so, I had to solve the issue where if the Backpack UI wasn't shown (I.E. you werent in the "Tower Defense Minigame"), you still had to push cancel twice to get the main menu.

    As a result, I edited your code and added in my fix to that by checking if the Backpack UI was visible. I also added in the option to have a specific key activate/deactivate the Backpack UI (as for my game, TAB is probably what I'd use if I decided to let the user still access the Main Menu).

    If you'd like me to share what I changed for that, I can clean it up a bit and let you know (it was quite easy, actually!)
  5. wrigty12 said:
    So I got to a point in my game where I wanted to just throw this into it to see if there are any incompatibilities. In order to do so, I had to solve the issue where if the Backpack UI wasn't shown (I.E. you werent in the "Tower Defense Minigame"), you still had to push cancel twice to get the main menu.

    As a result, I edited your code and added in my fix to that by checking if the Backpack UI was visible. I also added in the option to have a specific key activate/deactivate the Backpack UI (as for my game, TAB is probably what I'd use if I decided to let the user still access the Main Menu).

    If you'd like me to share what I changed for that, I can clean it up a bit and let you know (it was quite easy, actually!)
    My current solution for the backpack UI is if plugin command config not called then any hud/gui window will not be create and now there is plugin command for disable tower defense, and it will destroy the UI and other tower defense element. I would love to see your solution!
    Also I implement your shop to new update hope you don't mind! It's really help me a lot!


    Update for version 1.2 released!!

    -Add Shop GUI
    -Add Trigger wait
    -Add Steal & Critical effect
    -Bug fix & clean up
    -And more!

    Documentation
    https://github.com/unwantedfriedchicken/rpgmakermz-plugins/blob/master/dev/towerdefense/README.md

    Full Changelog
    https://github.com/unwantedfriedchicken/rpgmakermz-plugins/blob/master/dev/towerdefense/CHANGELOG.md

    Demo
    https://unwantedfriedchicken.itch.io/adventurer-guild-the-barrier-defender

    I want to make splash effect but my method will iterate too much event and scared will make game slower, if anyone have better solution let me know!
  6. I honestly didn't expect a new update so quick. Looks like I know what I'm doing for the next hour ^_^

    Your solution actually sounds much more optimal, especially for people who want this as a minigame. I'll check out all the new stuff, and if I feel like the changes I did would be beneficial, I'll share them!

    I did find a bug earlier today, and I see it still exists with the new one. If I hover my mouse over an Upgrade cell (the one with the actual info, so like Shortbow Hunter), then I hit the Cancel button, I can actually get the Backpack UI to appear at the same time as the Tower UI.
    1608430713045.png

    Suggestion: Rename the Icon Width/Height/X Position/Y Position parameters to like "Shop Button Width" and "Shop Button X Position" to make it clearer what it's affecting.
    Suggestion #2 (Low priority): While I kinda like how you use an image for the Shop Button which allows for artistic customization, maybe consider having the option for the user to choose whether to use an image like you have, or to use a regular box, with in-game Icon + text they define in the Plugin Parameters like "Shop Button Icon" and "Shop Button Text", and it still uses the Width/Height/X Position/Y Position that already have parameters. Again, super low priority, just another customization option.

    Plugin Parameter cleanup suggestions:
    - Change the shop button's X and Y Position parameters to @type number instead of string
    - For Tooltip and shop button X/Y Position parameters, add a @min -99999 option to allow for negative numbers without having to go to the Text tab.
    - For HUD/GUI Settings > Item Background Type and Tooltip > Background Type, use @type select instead of number to be a dropdown menu, in order for less user-error:
    1608433914708.png
  7. wrigty12 said:
    I honestly didn't expect a new update so quick. Looks like I know what I'm doing for the next hour ^_^

    Your solution actually sounds much more optimal, especially for people who want this as a minigame. I'll check out all the new stuff, and if I feel like the changes I did would be beneficial, I'll share them!

    I did find a bug earlier today, and I see it still exists with the new one. If I hover my mouse over an Upgrade cell (the one with the actual info, so like Shortbow Hunter), then I hit the Cancel button, I can actually get the Backpack UI to appear at the same time as the Tower UI.
    View attachment 171978

    Suggestion: Rename the Icon Width/Height/X Position/Y Position parameters to like "Shop Button Width" and "Shop Button X Position" to make it clearer what it's affecting.
    Suggestion #2 (Low priority): While I kinda like how you use an image for the Shop Button which allows for artistic customization, maybe consider having the option for the user to choose whether to use an image like you have, or to use a regular box, with in-game Icon + text they define in the Plugin Parameters like "Shop Button Icon" and "Shop Button Text", and it still uses the Width/Height/X Position/Y Position that already have parameters. Again, super low priority, just another customization option.

    Plugin Parameter cleanup suggestions:
    - Change the shop button's X and Y Position parameters to @type number instead of string
    - For Tooltip and shop button X/Y Position parameters, add a @min -99999 option to allow for negative numbers without having to go to the Text tab.
    - For HUD/GUI Settings > Item Background Type and Tooltip > Background Type, use @type select instead of number to be a dropdown menu, in order for less user-error:
    View attachment 171995
    The bug kinda take me a long time to fix because my messy code lol but now it's fixed!

    I don't know you can give min for negative number!!! that's the reason I make x y position string
    also value in type select option!?!?!! I don't need to convert to lowercase and now will have more possibility for select type!! Thank you!!

    I like your 2# suggestion I will add later
  8. This is a cool thing...can't wait to see what else you make...
  9. So actually playing your demo, in Wave 2, the Zombies got stuck at the switch because the Trigger event just below the bridge let them go forward. That's because the trigger was set to only apply to Ground type enemies, and the Zombie was All.

    I think you should either set it so the user can set several enemy types for that Plugin Command to affect, or have "All" type enemies are always affected.
  10. wrigty12 said:
    So actually playing your demo, in Wave 2, the Zombies got stuck at the switch because the Trigger event just below the bridge let them go forward. That's because the trigger was set to only apply to Ground type enemies, and the Zombie was All.

    I think you should either set it so the user can set several enemy types for that Plugin Command to affect, or have "All" type enemies are always affected.
    If the enemy types is all it will affected by any trigger types
    Do you update the script to 1.2.1? I think because I delete the toLowerCase the type checking doesn't work, you need to open the enemy/trigger config and select the type again to change to latest lowercase version

    It's work for me
    2020-12-20_14-55-04.png


    I haven't update the source & pc version to 1.2.1, I'll update it right now

    edit===
    I just tried the web version in itch and also broken, I forgot update the data :rswt
  11. You're right, due to the lowercase thing, now updating all the enemies to the new "all" instead of "All" works!

    EDIT - I just noticed, it doesn't look like the grid highlights areas you are able to place a tower after you open any Shop Scene if I have VisuStellaCore installed.. :( I'll try to figure out why.
    Update to above: So I used $gameMap.ufcGetGrid().setVisible(true) in the console for ease of enabling the grid. It gets into PIXI stuff, right? I'm not familiar enough to debug this... :(
    To reproduce:
    1) Install the VisuStella Core plugin
    2) Open your Demo project
    3) In Outside_City, set the grid to visible > It works
    4) Open a shop and close out
    5) Try to set the grid to visible again > it doesn't work.
    6) If I turn the VisuStella Core off and try this again, the grid still works.

    I did some random commenting out, and it looks like if I comment out your function:1608456423604.png
    the grid will still appear after opening the Shop. Since it looks like VisuStella Core does edit that function, something isn't clicking.

    Then I just added PIXI. to the Sprite.prototype.destroy call, and everything works again! So I guess I would recommend doing that?
    1608456987149.png
  12. wrigty12 said:
    You're right, due to the lowercase thing, now updating all the enemies to the new "all" instead of "All" works!

    EDIT - I just noticed, it doesn't look like the grid highlights areas you are able to place a tower after you open any Shop Scene if I have VisuStellaCore installed.. :( I'll try to figure out why.
    Update to above: So I used $gameMap.ufcGetGrid().setVisible(true) in the console for ease of enabling the grid. It gets into PIXI stuff, right? I'm not familiar enough to debug this... :(
    To reproduce:
    1) Install the VisuStella Core plugin
    2) Open your Demo project
    3) In Outside_City, set the grid to visible > It works
    4) Open a shop and close out
    5) Try to set the grid to visible again > it doesn't work.
    6) If I turn the VisuStella Core off and try this again, the grid still works.

    I did some random commenting out, and it looks like if I comment out your function:View attachment 172033
    the grid will still appear after opening the Shop. Since it looks like VisuStella Core does edit that function, something isn't clicking.

    Then I just added PIXI. to the Sprite.prototype.destroy call, and everything works again! So I guess I would recommend doing that?
    View attachment 172034

    I just try debuging this I think what VisuStella Core does is destroy every game object element when change scene, I'm still not sure but I try check the bitmap in Data_ufcGrid and it got destroyed. I just update the plugin for checking incase the bitmap is destroyed

    And I just check it your solution also work! the gameobject still destroyed properly, and you're right I checked VisuStella Core edit the Sprite class, but I don't know what they do since it's encrypted
    Now I'm not sure if I should use your solution or just checking

    Using VisuStella feels different, I think I also need make more tower defense game and using other plugins

    Edit ==
    I think I know why your solution works, VisuStella make Sprite destroy to also destroy the baseTexture since sprite grid texture reference bitmap in data so it also get destroyed. Because you use PIXI class instead the sprite class, the texture bitmap in data not get destroy
  13. Your solution works perfect!

    So I thought of a good enhancement idea, so I went and coded it in. Attached is the guide to adding it to your own code, so as always, if you feel like it's good feel free to just throw it in!

    It allows you to set RegionIDs to allow/not allow placing towers in the Config plugin command.

    The reason I thought of this is:
    1) Region IDs are a bit easier for users to throw on a map on the fly, instead of adding a new tileset item with a different TerrainTag
    2) If I want to make a map in the sky, but use the same tile for the entire map, there was no way to distinguish between where I could or couldn't place towers. Setting Region ID's allows this!

    I also found another Bug with VisuStella, this time with the Events and Movement Core: Once I place a tower, I can't interact with it and I can walk through it, and it doesn't look like the towers function at all.. :(
  14. wrigty12 said:
    Your solution works perfect!

    So I thought of a good enhancement idea, so I went and coded it in. Attached is the guide to adding it to your own code, so as always, if you feel like it's good feel free to just throw it in!

    It allows you to set RegionIDs to allow/not allow placing towers in the Config plugin command.

    The reason I thought of this is:
    1) Region IDs are a bit easier for users to throw on a map on the fly, instead of adding a new tileset item with a different TerrainTag
    2) If I want to make a map in the sky, but use the same tile for the entire map, there was no way to distinguish between where I could or couldn't place towers. Setting Region ID's allows this!

    I also found another Bug with VisuStella, this time with the Events and Movement Core: Once I place a tower, I can't interact with it and I can walk through it, and it doesn't look like the towers function at all.. :(
    After thinking about the grid texture your solution is the best since I don't need iterate to refresh the texture, I will also add PIXI class to destroy the sprite

    Oh you're right I think regionID is simpler rather than terrain tag, I will add this to next 1.3 update, Thank you!

    I just try the event and movement core, and I think they change every game class, for example, I use executemove to placing tower and visustella using their own executeMoveDir8 to move so my method not called.

    This will enable placing tower again
    2020-12-21_04-15-22.png

    But everything else still broke lol, I will try to fix it latter it's kinda difficult since they encrypt the source
  15. Definitely keep Terrain tag as an option though. I think of Terrain Tags as an overall setting, while RegionID is more for Fine Tuning.

    I hope the compatibility fix for VisuStella is an easy one..
  16. wrigty12 said:
    Definitely keep Terrain tag as an option though. I think of Terrain Tags as an overall setting, while RegionID is more for Fine Tuning.

    I hope the compatibility fix for VisuStella is an easy one..
    Yeah I still want keep the terrain tags

    I just updated the plugin, it's actualy not difficult, I think most of conflict is because I use events() and visustella make that return only Game_Event
    Oh right make sure the visustella is add before towerdefense plugins

    But there's something that kinda weird for me, when I use visustella movement and touch region that blocked like wall/event, the game is become lag when try to move is this only me? I tried deactive the towerdefense and still happening
  17. UnwantedFriedChicken said:
    Yeah I still want keep the terrain tags

    I just updated the plugin, it's actualy not difficult, I think most of conflict is because I use events() and visustella make that return only Game_Event
    Oh right make sure the visustella is add before towerdefense plugins

    But there's something that kinda weird for me, when I use visustella movement and touch region that blocked like wall/event, the game is become lag when try to move is this only me? I tried deactive the towerdefense and still happening
    I haven't seen any lag with those regions, and I use them in my normal game.

    Next VisuStella Bug, now when I try to interact with a placed tower, the Visustella Message Core causes an error with how you're drawing text...
    1608512535132.png
  18. wrigty12 said:
    I haven't seen any lag with those regions, and I use them in my normal game. Next VisuStella Bug, now when I try to interact with a placed tower, the Visustella Message Core causes an error with how you're drawing text... View attachment 172135
    It's normal with me, do you update the GuideAction?
    2020-12-21_08-04-47.png
  19. Yeah, I just downloaded a fresh version of your demo, added the newer GuideAction and Tower Defense .js, and installed the Message core and I still see it.

    Also the towers still don't seem to be attacking enemies when Events and Movement Core is enabled.