All times are UTC


Dear guest, welcome to YouTD!

Arms Dealer by limfa
Name General Description
1, 2
Arms Dealer v9
80
RARE
General
Wave lvl: 2

Submission
By: limfa
Date:2016-05-23 08:19:26
Status:
IN THE MAP v1.09
ID:480
Last Update:2016-10-08 15:15:19
Description
He can get rid of your illegal arms.

Abilities
The Customer Is Boss
Bosses coming within 600 range of the carrier have a 25% chance to grant [25 + current wave] gold. Cannot trigger on the same boss twice.

Level Bonus:
+1 gold
Specials

Specials:
-20% damage
-20% spell damage
+50% bounty collected


1, 2
Reply to topic

Discussion

Page 1 of 2 [ 22 posts ] Go to page 1, 2  Next
Author Message
 Post subject: Arms Dealer v9 (480)
PostPosted: Mon May 23, 2016 6:19 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
This is the discussion thread for the item Arms Dealer (480)

Creator's comments for this item:


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Fri May 27, 2016 11:12 am 
Offline
Light User
User avatar

Joined: Mon Mar 05, 2012 2:02 pm
Posts: 20
Seems like a usefull item for the start (when you need the gold) and gets kinda useless later on, like most of the bounty-items.
Anyway, since its a rare item with 50 goldcost, it can drop from first lvl on, though not very often (compareable with Spiderling). So you do not get it very often in the beginning + its only usefull in the beginning + it (kinda) only is usefull if there are some bosswaves incoming. All in all, this is a VERY situational item, and wont be usefull most times.
Imo you could change this, by not only selling to bosses (then it would always be good if getting it (more or less) early).
Ofc you would have to balance it, so mass-creeps giving less gold then boss-creeps, or there is a lower chance on selling or anything like this.

I definetly like the idea of it!

_________________
Come playing YouTD at ENTGaming.net !!!


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Fri May 27, 2016 3:59 pm 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
Well hmm maybe i could only add champions if i add mass creeps or normal it will get little imbalanced even if its 1 gold because item is leveling as tower gets level. Point is i balanced item for situations and for 50 gold if i make item so it can extract more gold i will need to make its value higher so it will reduce chance of getting it early.


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Wed Jul 27, 2016 8:09 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
Eh if just could someone see my item and add it to the game i would be so happy...


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Sun Sep 25, 2016 9:07 am 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4498
Location: Australia
Reviewed. Thanks for being patient.

Here's a suggestion to improve the code:
- You can set it to target only bosses in the constant part up the top rather than having to explicitly check for boss creeps.
- Proper indentation is easier to read.
- You were checking the boss level twice.

globals
    private constant integer UNITINRANGE_targetType = TARGET_TYPE_CREEPS + TARGET_TYPE_SIZE_BOSS
    private constant integer UNITINRANGE_range = 600
endglobals

function onUnitInRange takes Item itm returns nothing
    local Tower t = itm.getCarrier()
    local Creep c = Event.getTarget()
    local Playor p = t.getOwner()
    local integer bossLevel = c.getSpawnLevel()
    local integer rewardValue
   
    if itm.userInt < bossLevel then
        set rewardValue = t.getLevel() + bossLevel + 25
        if t.calcChance(0.25) then
            call p.giveGold(t.getLevel() + bossLevel + 25, t.getUnit(), true, true)
            call p.displayFloatingText("Items Sold $", t, 0, 255, 0)
            set itm.userInt = bossLevel
            set itm.userInt2 = itm.userInt2 + rewardValue
        endif
    endif
endfunction


The modifiers are quite hefty, but they make sense thematically and they push towards a 'bounty carry' meta, where the player might designate a non-carry tower for gold generation, stacking other effects that benefit from bounty bonuses on it.

Regarding the description, you need to shorten it, as it is currently too long (GMSI should warn you of this, if not, maybe you have an older GMSI version?). Note that the item description (set in object editor) contributes to this length limit. So you might want to reduce that too. Also, "Cannot sell to the same boss more than once."

However, my biggest problem with the description in its current state is the clarity. The ability claims to "sell" stuff to the boss. This heavily implies that one of the tower's items is removed. But from seeing the code that's obviously not the case. I think removing an item each time something is sold could be a neat concept.
If you want to follow this idea, you'd want to up the item to a unique and rebalance the gold gained, scaling it with the removed item's goldcost. This would provide an interesting new way to get rid of items, other than just combining them in the cube. But it would also make synergising other items with this one tricky, as they'd eventually end up getting sold if they sat in the same tower. This could be addressed by stating that the ability always sells away the item in slot 1, rather than a random slot.
If you don't want to follow this idea, think of a way to write the description that will not cause confusion.

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Mon Sep 26, 2016 11:01 pm 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
I like your idea of selling items and make it unique it would be great(only i would add possibilities if humanoid boss he gives gold if orc it gives damage to tower etc....) but i lack skill of coding it seams complicated for me but i could try only not now first i would like to see item in game then i will update it maybe :P

I tweaked a text a little(i have latest gmsi and its not giving me any warning) and code that you are suggesting has one flaw it looks tidier but it needs to check twice because if somehow lower level boss come into 600 range before higher level boss come in 600 range again lower level boss gets one more chance to give gold so it gets 50% chance and its possible because xspeed++ waves. I wanted that only once per boss come in range it gets gold not when he make circle and come in range again.


Top
 Profile  
 
 Post subject: Update to version v2!
PostPosted: Tue Sep 27, 2016 1:35 pm 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
The item has been updated to version v2!

Creator's reason for this update:


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Tue Sep 27, 2016 1:40 pm 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4498
Location: Australia
limfa wrote:
I like your idea of selling items and make it unique it would be great(only i would add possibilities if humanoid boss he gives gold if orc it gives damage to tower etc....) but i lack skill of coding it seams complicated for me but i could try only not now first i would like to see item in game then i will update it maybe :P

Sure, no worries. :)

limfa wrote:
I tweaked a text a little(i have latest gmsi and its not giving me any warning)

Hrm, maybe we haven't released those changes yet. We might give you an updated version that warns you. Otherwise, you can just check in the testmap whether it gets cut off or not.

limfa wrote:
and code that you are suggesting has one flaw it looks tidier but it needs to check twice because if somehow lower level boss come into 600 range before higher level boss come in 600 range again lower level boss gets one more chance to give gold so it gets 50% chance and its possible because xspeed++ waves. I wanted that only once per boss come in range it gets gold not when he make circle and come in range again.

Yep, I understand, but checking twice like that does not address this. With your current implementation a boss cannot give gold twice, but you can miss out on gold from a boss altogether, if they come in the wrong order.
Example:
boss lvl 5 comes and gives gold --> item.userInt=5
boss lvl 6 spawns but is slow
boss lvl 7 spawns and is faster than 6. It gives gold --> item.userInt=7
boss lvl 6 reaches tower, but can't sell because its level is lower than the saved level.

My suggested code does not fix this for you, but behaves the same way that your code behaves. In order to always have every boss give gold exactly once, you'd need to make things somewhat more complicated. One way would be to apply a hidden buff to the creep to 'mark' it as having given gold. Then you can check for that buff if it comes in range again. This then raises the question of how you want this item to interact with other instances of this item. Do you want two arms dealers to both be able to get gold off the boss? If yes, your current implementation allows this, but the hidden buff approach doesn't. In that case the item would need to be keeping track of all the creepwaves it has gotten gold from. Probably one big list of 240 elements that can either be 1 or 0. I'd suggest just sticking to te current logic as it's simple and the case where you get two boss waves in a row and the second overtakes the first is somewhat rare. But up to you.

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Re: Arms Dealer v2 (480)
PostPosted: Tue Sep 27, 2016 1:44 pm 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4498
Location: Australia
Re that latest update you made,
itm.userInt != bossLevel and itm.userInt < bossLevel

is exactly the same as
itm.userInt < bossLevel

basically if itm.userInt is less than bossLevel, it's never going to be equal to it. So the first half of your check is redundant.
Also, don't indent between the 'set' line and the 'if' line. You only want to indent when entering a block (eg an 'if' block or a 'function' block or a 'loop' block).

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Update to version v3!
PostPosted: Wed Sep 28, 2016 5:25 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
The item has been updated to version v3!

Creator's reason for this update:


Top
 Profile  
 
 Post subject: Re: Arms Dealer v1 (480)
PostPosted: Wed Sep 28, 2016 5:29 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
Glowackos wrote:
Hrm, maybe we haven't released those changes yet. We might give you an updated version that warns you. Otherwise, you can just check in the testmap whether it gets cut off or not.

Yeah i checked that and noticed that it was cut and i reduced text now it does not cut thanks for advice :)


Also i fixed code as suggested i hope it look nice and clean now :P.


I was thinking if u agree i could make fix amount of gold given 5x[bosslevel] without bonus level of tower and in addition 1% xp from reward value so on lv 100 boss tower would extract 500 gold and 5xp is it to much gold?


Top
 Profile  
 
 Post subject: Re: Arms Dealer v3 (480)
PostPosted: Wed Sep 28, 2016 10:41 pm 
Offline
YouTD developer
YouTD developer
User avatar

Joined: Wed Dec 29, 2010 12:20 pm
Posts: 4498
Location: Australia
Code:
- You don't have to overdo the indentation, one tab is enough.
- The p.giveGold function should be using the `rewardValue` variable computed in the previous line instead of recalculating the gold amount.
- Change 'Items Sold $' to 'Arms Sold $' (in Header and inRange triggers)

Description:
-
Quote:
All of your glorious weapons can be sold. " Faster! Give it to him and earn some gold "
is grammatically incorrect. I'd drop the second half of it altogether or just write something like
Quote:
All of your glorious weapons can be sold, but be quick!


Tooltips:
- Need to colour the 600.
- Need an empty line before level bonus.
- Level bonus should not end in a full stop, should not say 'per level' and should not capitalise 'gold'.
- Formulas should be entirely encapuslated in square brackets.
- You have to mention that it won't retrigger.
- Try this:
Quote:
The Customer Is Boss
Bosses coming within 600 range of the carrier have a 25% chance to purchase some arms from the dealer, granting [25 + current wave] gold. Cannot sell arms to the same boss twice.

Level Bonus:
+1 gold

If it gets cut off, you can try reducing/removing the item's description altogether, or dropping some flavour text from the tooltip:
Quote:
The Customer Is Boss
Bosses coming within 600 range of the carrier have a 25% chance to purchase some arms, granting [25 + current wave] gold. Cannot sell arms to the same boss twice.

Level Bonus:
+1 gold

or
Quote:
The Customer Is Boss
Bosses coming within 600 range of the carrier have a 25% chance to grant [25 + current wave] gold. Cannot trigger on the same boss twice.

Level Bonus:
+1 gold

or
Quote:
The Customer Is Boss
Has a 25% chance to grant [25 + current wave] gold each time a new boss comes within 600 range.

Level Bonus:
+1 gold

Dropping the flavour text from the tooltip like this is still okay, because the item name and description still explain the theme.

Balance:
- I'd up the gold cost a little to ~80-95.

_________________
Goldcost to waveLevel & elementLevel relationship
Incremental Testmap Stub & Tower Creation Map


Top
 Profile  
 
 Post subject: Update to version v4!
PostPosted: Mon Oct 03, 2016 6:05 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
The item has been updated to version v4!

Creator's reason for this update:


Top
 Profile  
 
 Post subject: Update to version v5!
PostPosted: Mon Oct 03, 2016 6:08 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
The item has been updated to version v5!

Creator's reason for this update:


Forgot space...


Last edited by limfa on Tue Oct 04, 2016 8:49 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Arms Dealer v5 (480)
PostPosted: Mon Oct 03, 2016 6:20 am 
Offline
Advanced User

Joined: Thu May 29, 2014 3:00 pm
Posts: 155
Location: Serbia
Ok, I have done what you asked of me but I changed some things. Also, I came up with else part of code because I do not want for boss have another 25% chance when he comes in range again if 25% chance does not trigger in the first place.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group