It is currently 15 Nov 2018, 06:20
   
Text Size

More ability icons

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: drool66, stassy, BAgate, gmzombie, Aswan jaguar, CCGHQ Admins

More ability icons

Postby Korath » 15 Jun 2013, 15:15

So I was installing graphic mods the other day and saw extra unused artwork in Abilities.bmp - icons for shroud, vigilance, deathtouch, lifelink, and two more which I'm not quite sure are meant to represent. This got me to wondering whether these could be displayed in-game.

Many hours of trying to decipher the exe later, I find out that someone (Jatill, I think) has already done most of the hard part. The code is currently disabled, though. I see mention in this thead that it was causing crashes; but both the code in C and the exe look sound. So I've been fiddling with it.

ability_icons.jpg
Pictured are Boros Swiftblade with double strike (and first strike); Phyrexian Juggernaut with infect; Darksteel Colossus with indestructible (and trample); Soltari Foot Soldier with shadow; Silhana Ledgewalker with hexproof; Blind Zealot with intimidate (icon also used for fear); Deadly Insect with shroud; Latch Seeker with unblockable; Serra Angel with vigilance (and flight); and Vampire Nighthawk with deathtouch and lifelink (and flight).

There's room for four more icons before things get harder again.

Current issues that I know about:
  • Cards that shouldn't get any icons at all sometimes displayed most of the new ones. This one I've already fixed.
  • Double strike is always displayed with the first strike icon, too. This I can fix without a whole lot of effort. Fixed.
  • Sometimes the new icons don't properly trigger repaints when an ability is added. (For example, with several copies of Way of the Thief enchanting several creatures, when a guildgate is put into play, the unblockable icon doesn't show up on a given creature until its card is covered by another window.) I think I know what's wrong here, but it'll be a bit harder. Wrong-o. Still looking. Fixed.
  • Cards coded in asm and the original exe don't properly display unblockable or fear. It might also happen with shroud and vigilance, though I haven't seen it; it's less likely for the others. This can probably only be fixed by recoding the cards.
  • Some of them show up in cards in your hand; some don't; some only sometimes do, depending on the specific card. If this is fixable at all, I have no idea how.
  • The new icons don't have tooltips. Probably fixable, but not a high priority. Fixed.

Anyone remember any other issues that showed up while the old version of this was enabled? Know what the icons I've used for intimidate and unblockable above are meant to be? Have votes for the remaining four abilities, or objections to using one for any of the keywords I've picked above?
Last edited by Korath on 23 Jun 2013, 23:53, edited 6 times in total.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Re: More ability icons

Postby Aswan jaguar » 15 Jun 2013, 15:32

-The intimidate "wolf" icon was certainly for Rampage.
-For the one you used for unblockable I am not sure but I believe it is appropriate for creatures with shadow.

Thank you very much for this, it is awesome.I have spend a lot of time to figure how this could happen,made a couple of (amateur - noncoder) tries with no success,and now that I see it happening I am very pleased you certainly made my day. =D>
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Aswan jaguar » 15 Jun 2013, 16:08

Korath said:
Double strike is always displayed with the first strike icon, too. This I can fix without a whole lot of effort.

That is because double strike has also first strike and normal strike (and AI gets first strike)so we decided to use first strike ability and the icon.
You probably have found already that if you put 0 to the first Strike ability in ct_all the icon is no longer visible but Double Strike doesn't work then either, so are you going to implement Double Strike properly in the exe (that AI at least gets it as normal first strike)and not dependable to first Strike ability?

Korath said:
Some of them show up in cards in your hand; some don't; some only sometimes do, depending on the specific card. If this is fixable at all, I have no idea how.
This has to do with a global bug I reported a couple of days earlier that some cards gave or had the ability in hand,too and Gargaroz said that this is already fixed for all cards.
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Korath » 15 Jun 2013, 16:19

Aswan jaguar wrote:so are you going to implement Double Strike properly in the exe (that AI at least gets it as normal first strike)and not dependable to first Strike ability?
Nope, I was planning on just removing the first strike icon in the display code only - get_ability_image() can currently only add new icons, but it should be straightforward to make it able to both add and remove them.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Re: More ability icons

Postby Aswan jaguar » 15 Jun 2013, 16:31

If you want help testing this,attach the appropriate files and I will be happy to play with it,....help I mean. :mrgreen:
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Korath » 15 Jun 2013, 18:37

I'm happy to provide patches if you can build from source, but I'm reluctant to distribute executables (especially this early on). I know I wouldn't want to start seeing bug reports against a competing version start showing up if I were in Gargaroz' position.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Re: More ability icons

Postby Aswan jaguar » 15 Jun 2013, 19:12

Unfortunately I am unable to build from source as you say (I have not a clue what that means) :oops:
If you want to distribute executables through pm so that people don't get and report bugs to Gargaroz,then fine as I most certainly would test it to a copy version (I don't like testing things that may cause problems to my "official" version) and possible bugs will not be reported in bug forum but here.
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby gmzombie » 15 Jun 2013, 19:14

why not just add in with Garg? I mean there has been alot of dev help from other people too including Gargaroz, Sonic, Jatill, Harry pitfall, Sky marshal, of course the originator Mok and even a little bit from myself..though i do mostly hack ive been known to get some things working. But seriously we could always use another hand. we all know that throughout the updates online play was trashed somehow and i cant quite remember when it worked right but i have updates linking all the way back to MOK's original update. This is just one prime example. the other one that i was kinda working on was trying to figure out what routines and subroutines go where in the exe. labeling them so we could get a better idea on how to fix and update the main game itself. all of the new stuff has been done in C and all the original stuff is done in ASM. I dont want to overwelm people and i know we all have real lives but really any help is great. i love the fact that you have been able to add in those icons. good work
can I maze of ith your snowstorm?

http://home.comcast.net/~gmzombie/index.html old stuff in here. don't use this stuff right now till I get time to get back into it and readjust.
gmzombie
 
Posts: 855
Joined: 26 Feb 2009, 01:05
Location: Wyoming, Mi
Has thanked: 199 times
Been thanked: 50 times

Re: More ability icons

Postby Korath » 16 Jun 2013, 12:05

Yes, I do intend to submit this for the official versions, but not until it's working significantly better.

Since Aswan's confirmed it'll run on non-cygwin machines (always a headache), I'll provide the executables via pm if people want to tinker with it. Just please don't report bugs against it in the bug forum without confirming they're present in the official version; I've been on the other side of a situation like that before, and it's a maintenance nightmare.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Re: More ability icons

Postby Aswan jaguar » 16 Jun 2013, 12:34

1- Like when Jatill released this there are some peculiar bugs happening and crashes which most of them if you load the autosave will not happen again.
2- I had hard crashes (out of the game) more often when a card gave all creatures or yours an ability like Avatar of Slaughter not every time though.
3- I had hard crashes almost every time with Auriok Edgewright when the 3 artifact entered the battlefield and the Auriok Edgewright would gain double strike.

4- The most reliable and odd bug I encountered which happens every time in the savegame I am providing and happened other times,too but I couldn't catch it is that at least if a creature of yours dies and you double click the battlefield area doesn't matter which side the game will hard crash.I haven't experienced that with normal patch so I am guessing it has something to do with the ability icons (but could be due to a card bug)
Attachments
test crash double click.rar
(2.13 KiB) Downloaded 165 times
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Aswan jaguar » 16 Jun 2013, 13:24

About the double click bug I tested more and seems to be related-happening when a spell enters or leaves the stack and you double click you get a hard crash out of the game.(at least to my set up)
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Gargaroz » 16 Jun 2013, 13:29

Korath, actually I'm storing all the data for non-standard abilities in "targets[16].card", here's the table of what's actually coded (the missing values are used only for coding purposes and don't need icons).

typedef enum
{
SP_KEYWORD_FEAR = 1<<0,
SP_KEYWORD_LIFELINK = 1<<1,
SP_KEYWORD_HASTE = 1<<2,
SP_KEYWORD_VIGILANCE = 1<<3,
SP_KEYWORD_UNBLOCKABLE = 1<<4,
SP_KEYWORD_CANNOT_BLOCK = 1<<5,
SP_KEYWORD_CANNOT_ATTACK = 1<<7,
SP_KEYWORD_SHADOW = 1<<8,
SP_KEYWORD_DEATHTOUCH = 1<<9,
SP_KEYWORD_MUST_ATTACK = 1<<10,
SP_KEYWORD_INDESTRUCTIBLE = 1<<11,
SP_KEYWORD_MUST_BE_BLOCKED = 1<<12,
SP_KEYWORD_FLANKING = 1<<13,
SP_KEYWORD_WITHER = 1<<14,
SP_KEYWORD_BUSHIDO = 1<<15,
SP_KEYWORD_DEFENDER = 1<<19,
SP_KEYWORD_RFG_WHEN_DAMAGE = 1<<20,
SP_KEYWORD_LURE = 1<<22,
SP_KEYWORD_HEXPROOF = 1<<23,
SP_KEYWORD_INTIMIDATE = 1<<25,
SP_KEYWORD_MUST_BLOCK = 1<<26,
SP_KEYWORD_PERSIST = 1<<29,
SP_KEYWORD_HORSEMANSHIP = 1<<30,
} sp_keyword_t;
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
Gargaroz
Programmer
 
Posts: 7095
Joined: 06 Nov 2009, 11:11
Has thanked: 82 times
Been thanked: 593 times

Re: More ability icons

Postby Korath » 16 Jun 2013, 15:01

I can't reproduce the problems with Auriok Edgewright or Avatar of Slaughter.

I am seeing the double-click one with your savegame, though; it's crashing in get_abilities() in the exe, which I call to check for shroud, double strike, and infect. Obviously there's another way to do this, or it'd happen with the standard icons like landwalk and flying.

The extra abilities in instance->targets[16].card and instance->state (vigilance) should be fine; I just look at the data directly.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Re: More ability icons

Postby Aswan jaguar » 16 Jun 2013, 15:04

Creatures that gain Unblockable ability either by their own or others or by a spell until the end of the turn the icon remains on them through the whole game although the ability is no longer active.And as you said no card coded in asm shows unblockable icon.
---
Just playtesting.
User avatar
Aswan jaguar
Super Tester
 
Posts: 5802
Joined: 13 May 2010, 12:17
Has thanked: 520 times
Been thanked: 274 times

Re: More ability icons

Postby Korath » 16 Jun 2013, 15:40

Unblockable problem doesn't surprise me too much; PtM didn't add the bit in unblockable() (and may in fact have been calling the version in the exe), so I added it in. Same with intimidate. I haven't found where the bits in targets[16].card are removed yet, though.
Edit: At least hexproof (e.g. from Glaring Spotlight) does the same thing. I suspect all the targets[16].card abilities do.

Same problems with Fear for exe/asm creatures and effects as Unblockable, etc.: Gluttonous Zombie, Severed Legion, and Fear itself. I don't know whether it's a good idea to use the same icon for fear and intimidate anyway, though.

Apparently the standard abilities get cached periodically into card_instance_t::regen_status. Or at least that's how the exe is checking for them to display icons. Seems to be working for shroud/double strike/infect, too.
User avatar
Korath
DEVELOPER
 
Posts: 3345
Joined: 02 Jun 2013, 05:57
Has thanked: 481 times
Been thanked: 917 times

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 4 guests


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 4 guests

Login Form