It is currently 18 May 2024, 06:22
   
Text Size

(Tejahn) Manifest Cards

Moderator: CCGHQ Admins

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 08:58

Cloud or Rage? #-o

Image
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 14:16

Bug report

Write into Being -- causes the game to crash during selection "top or bottom"
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby RiiakShiNal » 22 Mar 2015, 15:01

Xander9009 wrote:Hey Riiak. Do you have any ideas on how to make Soul Summons work right if copied? At the moment, if I copy the spell, then the top card is manifested (by the copy), but it doesn't the ability to turn face up. This is because the ability is granted by Soul Summons and the data for the ability to show is stored in the objectDC of the now nonexistent copy.

The only thing I can think of to solve this is to make a manager token, but I'm not sure if that's necessary. Doing that way would hopefully just mean adding the card to a list which the manager token grants the relevant ability and then what happens to the original card that caused it to become manifested doesn't matter.
I haven't seen the code so at this point I can't say. Though it definitely doesn't sound right as you really shouldn't be linking data into an ObjectDC for this you should be using delayed triggers and granted abilities possibly using a LinkedDC(). Otherwise how are you going to support Soul Summons with say Regrowth and then recasting Soul Summons? Wouldn't that also screw things up by overwriting the data in the ObjectDC?
RiiakShiNal
Programmer
 
Posts: 2185
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: (Tejahn) Manifest Cards

Postby Xander9009 » 22 Mar 2015, 15:56

RiiakShiNal wrote:I haven't seen the code so at this point I can't say. Though it definitely doesn't sound right as you really shouldn't be linking data into an ObjectDC for this you should be using delayed triggers and granted abilities possibly using a LinkedDC(). Otherwise how are you going to support Soul Summons with say Regrowth and then recasting Soul Summons? Wouldn't that also screw things up by overwriting the data in the ObjectDC?
Actually, it always uses the next unused slot like you did for the ObjectDC functions as a whole with one major difference: I didn't include any ability to reuse older, now unneeded slots. When it manifests a card, it starts off by storing the card in RSN_ObjectDC():Set_CardPtr(RSN_ObjectDC():Count(), Card). (Actually, it's not RSN_ObjectDC() directly, but rather a subchest, but the idea is the same.) However, all of the information the manifested card needs is stored on that manifested card in an objectDC subchest. The manifester simply loops through its own subchest and constantly grants the manifest ability to all of the cards it manifested if they're still on the bttlefield face-down.

And there's the problem which could be solved with a manager: move that list of cards that should be granted the ability to a manager and it's okay if the manifester ceases to exist. However, I'll look into doing it without objectDCs at all if you think that would be cleaner. As it stands, it's pretty straightforward and relatively easy to follow. And working. Can't forget working lol. The only part not working is copying the spell.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 16:39

Script_log.txt

[lua] [string "TEJAHN_FRF_JESKAI_INFILTRATOR_100391862_TITLE (RESOLUTION_TIME_ACTION)~0x0000065f"]:19: attempt to index a nil value
[lua] [string "FAVOR_OF_THE_GODS_MM_CW_9009000_TITLE (RESOLUTION_TIME_ACTION)~0x00000879"]:3: attempt to call global 'S_DisplayManaPool' (a nil value)
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 16:47

Xander9009 wrote:Also, I got the manifested card viewing working :) When you activate a manifested card's ability, it'll look for any matching cards in your library, graveyard, hand, and battlefield (in that order) and show you the card if it finds one. Click finish (you can select the card but the selection is 100% irrelevant) and it'll turn face-up. Click cancel and it'll stay how it is. If it doesn't find a card, it'll display the name, types, subtypes, cost, power, and toughness and ask which to do. It actually works really well. It'll only have to use that backup for cards which only have one current copy across all your zones ('current' meaning it's not currently a copy of something else, which includes manifest and morph) or if you get an enemy's card (with Ghastly Conscription).
Usually, "view" shows or does nothing, especially on the early turns.

BTW, I dropped TEJ_MANIFEST.LOL into ...\Magic 2014 - Manifest\DATA_DLC_DECK_BUILDER_CUSTOM\DATA_ALL_PLATFORMS\FUNCTIONS. I that correct? Do I need it at all?
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 16:54

Kithkin wrote:Bug report

Write into Being -- causes the game to crash during selection "top or bottom"
The updated version works fine.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Xander9009 » 22 Mar 2015, 16:55

You definitely do need it. Without it, nothing is stored or retrieved about the card's information.

In the deck you're using which usually shows or does nothing, how many copies of the cards do you have? Try manifesting a card with lots of copies right at the beginning of the game and see if that works. This is because if there are no other copies to reference, then the ability shows the stored text rather than the copy. I doesn't check exile because that's not an easy task and not worth it in my opinion. However, as long as there's one card with the same current name as the manifested card's original name in your deck, hand, graveyard, or battlefield, it should display it.


In other news: I got everything switched over to LinkedDCs instead of ObjectDCs, but it's still a bit messed up. I can still cast it again if I pull it from the graveyard just like before without a problem, but copying the spell still has an issue. Now, though, instead of the copied spell manifesting a card without the ability to turn it face up, it does have the ability to turn face up. However, when the original resolves a moment later, it's automatically turned face up as the original spell manifests the next card.

For Favor of the Gods, I've never had that issue. Either way, the mana abilities were completely rewritten yesterday, so that shouldn't be an issue now.

For Jeskai Infiltrator, do you remember the circumstances? What it did to cause that error?The only thing I can see that might have caused it is if the library was empty. I forgot to check for that before referencing the top card. They'll all need that check added.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 17:45

Xander9009 wrote:For Jeskai Infiltrator, do you remember the circumstances? What it did to cause that error?The only thing I can see that might have caused it is if the library was empty. I forgot to check for that before referencing the top card. They'll all need that check added.
Here is another one for Jeskai Infiltrator:

[lua] [string "TEJAHN_FRF_JESKAI_INFILTRATOR_100391862_TITLE (RESOLUTION_TIME_ACTION)~0x0000065c"]:7: parameter mismatch or too few parameters [expected bzText&]

Sometimes, after dealing damage to a player, Jeskai Infiltrator returns as Jeskai Infiltrator instead of a Manifest. I guess, there is a correlation.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 22 Mar 2015, 18:20

Kithkin wrote:
Kithkin wrote:Bug report

Write into Being -- causes the game to crash during selection "top or bottom"
The updated version works fine.
Well, not quite. Whenever I manifest a non-creature card, the game crashes. Manifesting a creature card is fine.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Xander9009 » 23 Mar 2015, 18:13

Okay, so I've changed some stuff around and need to know if they work.

Cloudform, Jeskai Infiltrator, Soul Summons, and Write into Being all now use a LinkedDC instead of ObjectDC. The information for the manifested card is still stored on that card's own objectDC, as that's the best place for it to be accessible to other cards that might need it (Lens of Clarity). They also all now check if it's a creature and you can afford the cost before turning it face-up rather than only disallowing you from selecting the top option in the multiple choice. This is because the other method (the main one) which shows you the actual card doesn't prevent you from selecting finish.

Cloudform: Corrected text.

Jeskai Infiltrator: Reworked a bit and should hopefully be fixed.

Write into Being: Reworked to avoid crashes when manifesting non-creatures.

These four have been updated int eh Manifest folder. Reacquire those four and test them out for me? I'm hoping they work.

However, this still doesn't allow the spells to be copied. I did test copying the permanents that manifest (tested on Jeskai Infiltrator and Cloudform) and they work properly. If they're copied, those copies can manifest cards without interfering with or relying on the original, and the manifested card remains manifested and flip-able even after the copied card which manifested it has ceased to exist. This doesn't work for Soul Summons or Write into Being.

My test card has been updated in the Community Wad (though I don't know if it's repacked with it yet, so you might have to grab it from the loose files folder here). It doesn't have updated Text_Permanent entries, though. It uses tokens which are available in the CW and will either require it to work (just for tokens) or you'll need to grab those it references (token registrations are at the bottom, just look there for which ones to grab).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 23 Mar 2015, 21:11

Cloudform -- fixed
Jeskai Infiltrator -- fixed
Write into Being -- fixed

What still puzzles me is "view hidden info". I can't find a pattern, why it does not work in a reliable way. Sometimes it works right from the start, sometimes I have to cast many other manifests and then the info suddenly shows, and sometimes the info never shows during a match. And, yes, I have more than one copy of the cards in the deck.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Xander9009 » 24 Mar 2015, 02:23

Hey, Kithkin, are you testing these in a clean game directory, or is it your normal game directory with other mods and whatnot? If it's just got testing stuff for this, would it possible for you to zip the entire folder except for the base game wads and the movies folder? Without those, it should just be a couple of MBs. This way, I could just directly unzip the exact setup you're using and hopefully figure out why you're having trouble.

If it's your normal game folder with other mods, then that would be a bit more difficult to do that way. Instead, I'll include post a version of the functions file with a bunch of debug notifications enabled and you can just see which ones show up.

Also, in other news, I've tried converting all of the cards to use linkedDCs instead of ObjectDCs, but they just don't all seem to want to cooperate. A few of them did, but a few others behaved strangely. For instance, despite using a Notepad++ plugin to make sure there was NOTHING different about Cloudform and Lightform that would affect how anything worked, one worked fine and the other did nothing. So, since they're working, they're staying as they are. That means the only thing left to try and get fixed by tomorrow is the random inability to view the card's information. The only thing that doesn't work besides that is copying spells on the stack. I'm still trying to think of a way to do it without a manager token, though. The linkedDCs didn't work, although they did fix one other issue on one of the cards.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: (Tejahn) Manifest Cards

Postby Kithkin » 24 Mar 2015, 15:56

Xander, PM sent.
User avatar
Kithkin
 
Posts: 456
Joined: 21 Feb 2014, 07:12
Location: Cologne, GERMANY
Has thanked: 11 times
Been thanked: 56 times

Re: (Tejahn) Manifest Cards

Postby Xander9009 » 24 Mar 2015, 18:08

So, I fixed the issue, I think. I needed to add EffectController():SetItemCount(1) before asking the player to choose the card. However, in testing this, I discovered another issue which won't be NEARLY as common. If two manifest cards with triggered abilities trigger at the same time, only the first one to resolve will work. For instance, if Cloudform and Lightform enter the battlefield at the same time, the first one to resolve will work fine, but the second will not.

All of the cards in the GD folder have been updated with the SetItemCount, so try copying those over and let me know if it fixes the issue. These ones will also have the updated creature check to avoid turning face-up when the manifested card wasn't originally a creature (also prevents them from turning face-up if you can't afford the cost).
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 24 guests


Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 24 guests

Login Form