[Deprecated] Instructions on how to mark face-up cards in duels

If you have a suggestion for the site, create a topic here and telll us about it
Christen57
User avatar
Posts: 1772
Joined: Sun May 07, 2017 10:37 pm
Reputation: 163
Location: New York, United States of America

[Deprecated] Instructions on how to mark face-up cards in duels

Post #1 by Christen57 » Tue Sep 29, 2020 7:29 am

At the time of writing this, duelingbook currently does not allow players to mark face-up cards in duels, so I have decided to create instructions on how to do so using javascript bookmarks.

There are multiple reasons why a player would want, or need, to be able to mark face-up cards in duels. Take for instance "Apollousa, Bow of the Goddess". This is a Link Monster with the effect, "The original ATK of this card becomes 800 x the number of Link Materials used for its Link Summon. Once per Chain, when your opponent activates a monster effect (Quick Effect): You can make this card lose exactly 800 ATK, and if you do, negate the activation."

Image

Currently, in duels on duelingbook, this Link Monster will always have it's attack value displayed as just a question mark while it is in a monster zone, with no way for players to manually modify this attack value to match the attack value that it should have, whether that attack value is 3200, 2400, 1600, or any other value it's supposed to have in the duel at that moment.

Image

This means that players are left with no choice but to mentally keep track of it's attack value at all times. This is a problem because players cannot be expected to consistently remember constantly-changing attack values of monsters throughout duels without forgetting something. When players are forced to do this, the end result is that they inevitably end up forgetting how much attack certain monsters have, and thus have to go back and review logs and/or chat history to see what the changes were, which is tedious and a waste of time.

In order to alleviate this issue, many players, myself included, used counters as a means of keeping track of the attack values of our Apollousa, Bow of the Goddesses. This means that, for every Link Material used to Link Summon this monster, we place 1 counter on it. If Apollousa, Bow of the Goddess was Link Summoned using 4 monsters as Link Material, we would place 4 counters on it. If it was Link Summoned using 3 monsters as Link Material, we would place 3 counters on it. If it was Link Summoned using 2 monsters as Link Material, we would place 2 counters on it. Then, when we want to activate it's effect to have it lose exactly 800 attack so that we can negate a monster effect activation, we would simply declare that we are activating the effect and remove a counter from it.

The number of counters on it would indicate how much attack it had remaining, as we could simply multiply said number of counters by 800 to determine it's remaining attack value. This proved to be a simple and straightforward process, and it proved to be an efficient easy way to compensate for not being able to manually mark the attack value on the card.

However, some users such as Genexwrecker have decided that we should not be allowed to use this easy effective efficient simple straightforward method for keeping track of the attack value of Apollousa, Bow of the Goddess. https://forum.duelingbook.com/viewtopic.php?f=13&t=11517

As a result, I have decided to come up with a way to mark face-up cards in duels so that you can, for instance, manually type in 3200, 2400, or whatever other attack value your Apollousa, Bow of the Goddess should have, and have that number marked on the card so that it is visually seen on the card itself.

First things first, like always, when doing any kind of javascript on duelingbook, you must make sure javascript is enabled/allowed on duelingbook. This is what it looks like on Google Chrome.

Image

Image

You may be told to refresh/reload your page.

Image

On other browsers like mozilla firefox, javascript may already be enabled/allowed on duelingbook by default. Either way, after making sure javascript functions properly on duelingbook, create a new bookmark for your browser. Name it whatever you want. For this demonstration, I will name it "card modifier".

Image

In the box that says "URL," copy and paste this entire line of code:

javascript:(function(){var overlay=document.createElement('div');Object.assign(overlay.style,{position:'fixed',top:0,left:0,width:'100vw',height:'100vh',zIndex:99999999,background:'transparent',cursor:'crosshair'});document.body.append(overlay);function getElement(event){overlay.style.pointerEvents='none';var element=document.elementFromPoint(event.clientX,event.clientY);overlay.style.pointerEvents='auto';return element};document.addEventListener('mousemove',function(event){var element=getElement(event);if(!element)return;var position=element.getBoundingClientRect();Object.assign(overlay.style,{background:'rgba(0, 128, 255, 0.25)',outline:'1px solid rgba(0, 128, 255, 0.5)',top:''+position.top+'px',left:''+position.left+'px',width:''+position.width+'px',height:''+position.height+'px'})});overlay.addEventListener('click',function(event){document.body.removeChild(overlay);var element=getElement(event).parentElement.parentElement.querySelector("span[class='name_txt']");var text=element.textContent||element.value;text=text.replace(/\n[ \n]+\n/g,"\n").replace(/\n\n+/g,"\n\n").replace(/^\n+|\n+$/g,'');if(!text.match("\n"))text=text.replace(/^ +| +$/,'');var promptext=window.prompt('Enter name:',text);if(promptext!=null)element.outerHTML=element.outerHTML.slice(0,76)+'white; white-space: nowrap; font-size: 300px;">'+promptext+'</span>'})})()

Then click the "Save" button to save it. It's located here:

Image

On mozilla firefox, it looks like this:

Image

Now, after you save your bookmark, go into solo mode or any duel, and bring out the card that you wish to mark, either onto the field, into your hand, in your extra deck, in your graveyard, or banish it face-up. For this demonstration, I will be bringing out Apollousa, Bow of the Goddess onto my field.

Image

Once you've brought out your card that you wish to mark in any one of those locations, click on your newly created bookmark. If everything was done correctly, this should happen:

Image

A big blue rectangle should fill your screen, or at least a part of it, and also your cursor should turn into a
plus + symbol that gets followed around by the blue rectangle.

When this happens, click on the face-up card you wish to mark. Notice how when you hover your mouse over it, the blue rectangle that once filled your screen now just fills that card. That shows you that the card is selected.

Image

When you click on the card, a little window should come up. On Google Chrome, it looks like this:

Image

On mozilla firefox, it looks like this:

Image

Type in anything you want in the box, and then either hit the Enter key on your keyboard or click the OK button.

Now the name of the card should change to whatever you inputted.

Image

This is what the whole thing looks like on Google Chrome.

Image

This is what it looks like on mozilla firefox.

Image

The best part about all of this is that the modification will remain even if the modified card leaves the field, becomes an xyz material, or gets flipped face-down, and you can even edit the card while it is in the deck, graveyard, face-up on the field, in an extra deck, or while it is banished, as long as it is face-up for you to see in any of those locations. In fact, I think the only way the modification will revert back to normal would be if you refreshed the entire page.

Now you will be able to manually mark your Apollousa, Bow of the Goddess and other face-up cards which will make it easier to keep track of things like attack value, as you can mark the card so it reads "ATK: 3200" or "ATK: 2400" and so on.
Last edited by Christen57 on Mon Oct 03, 2022 9:25 pm, edited 1 time in total.

KTeknis
User avatar
Posts: 699
Joined: Mon Nov 11, 2019 12:32 pm
Reputation: 73

Post #2 by KTeknis » Tue Sep 29, 2020 7:39 am

Wait, can the opponent see the modification?
I have interest in badly designed custom cards.
You saw these cards as terrible, I saw them as ideas.

Jedx_EX
User avatar
Posts: 276
Joined: Tue Aug 18, 2020 4:18 pm
Reputation: 7
Location: Earth
Mood:

Post #3 by Jedx_EX » Tue Sep 29, 2020 3:28 pm

KTeknis wrote:Wait, can the opponent see the modification?


I've tried it out, and the answer is nope. Your edits will be private.

Genexwrecker
User avatar
Posts: 2145
Joined: Sat Feb 25, 2017 10:52 pm
Reputation: 360

Post #4 by Genexwrecker » Tue Sep 29, 2020 5:21 pm

That is a very convoluted way to take a simple attack modification note which you have a chat to write down
Official Duelingbook Support staff
Official Duelingbook Resource Judge
Official Duelingbook Tournament Admin.(Other tournament Admin is Runzy)

Christen57
User avatar
Posts: 1772
Joined: Sun May 07, 2017 10:37 pm
Reputation: 163
Location: New York, United States of America

Post #5 by Christen57 » Tue Sep 29, 2020 8:23 pm

Christen57 wrote:
In the box that says "URL," copy and paste this entire line of code:

javascript:(function(){var overlay=document.createElement('div');Object.assign(overlay.style,{position:'fixed',top:0,left:0,width:'100vw',height:'100vh',zIndex:99999999,background:'transparent',cursor:'crosshair'});document.body.append(overlay);function getElement(event){overlay.style.pointerEvents='none';var element=document.elementFromPoint(event.clientX,event.clientY);overlay.style.pointerEvents='auto';return element};document.addEventListener('mousemove',function(event){var element=getElement(event);if(!element)return;var position=element.getBoundingClientRect();Object.assign(overlay.style,{background:'rgba(0, 128, 255, 0.25)',outline:'1px solid rgba(0, 128, 255, 0.5)',top:''+position.top+'px',left:''+position.left+'px',width:''+position.width+'px',height:''+position.height+'px'})});overlay.addEventListener('click',function(event){document.body.removeChild(overlay);var element=getElement(event).parentElement.parentElement.querySelector("span[class='name_txt']");var text=element.textContent||element.value;text=text.replace(/\n[ \n]+\n/g,"\n").replace(/\n\n+/g,"\n\n").replace(/^\n+|\n+$/g,'');if(!text.match("\n"))text=text.replace(/^ +| +$/,'');var promptext=window.prompt('Enter name:',text);if(promptext!=null)element.outerHTML=element.outerHTML.slice(0,76)+'white; white-space: nowrap; font-size: 300px;">'+promptext+'</span>'})})()



This code is now outdated. I've just updated it removing a few unnecessary parts of it so it's more tidy, and I've also discovered and fixed a minor error within my code that caused it to not work properly with a few specific cards.

Here is the new updated code:

javascript:(function(){var overlay=document.createElement('div');Object.assign(overlay.style,{position:'fixed',top:0,left:0,width:'100vw',height:'100vh',zIndex:99999999,background:'transparent',cursor:'crosshair'});document.body.append(overlay);function getElement(event){overlay.style.pointerEvents='none';var element=document.elementFromPoint(event.clientX,event.clientY);overlay.style.pointerEvents='auto';return element};document.addEventListener('mousemove',function(event){var element=getElement(event);if(!element)return;var position=element.getBoundingClientRect();Object.assign(overlay.style,{background:'rgba(0, 128, 255, 0.25)',outline:'1px solid rgba(0, 128, 255, 0.5)',top:''+position.top+'px',left:''+position.left+'px',width:''+position.width+'px',height:''+position.height+'px'})});overlay.addEventListener('click',function(event){document.body.removeChild(overlay);var element=getElement(event).parentElement.parentElement.querySelector("span[class='name_txt']");var promptext=window.prompt('Enter name:',element.innerHTML);if(promptext!=null)element.outerHTML=element.outerHTML.slice(0,69)+'white-space: nowrap; color: white; font-size: 300px;">'+promptext+'</span>'})})()

greg503
User avatar
Posts: 2062
Joined: Fri Mar 31, 2017 3:43 pm
Reputation: 174
Location: Flundereeze

Post #6 by greg503 » Tue Sep 29, 2020 10:34 pm

Is this really better than writing in chat or otherwise mutually agreeing on how to communicate certain things?
Buy Floowandereeze

Christen57
User avatar
Posts: 1772
Joined: Sun May 07, 2017 10:37 pm
Reputation: 163
Location: New York, United States of America

Post #7 by Christen57 » Tue Sep 29, 2020 11:42 pm

Jedx_EX wrote:
KTeknis wrote:Wait, can the opponent see the modification?


I've tried it out, and the answer is nope. Your edits will be private.


Correct. All modifications to any cards using this javascript code are local, meaning they will not show up on other screens. However, if you mark a face-up card and then screenshot it, then share the link to the screenshot with other people, they will, in that case, be able to see the modifications that you screenshotted, but otherwise, they can't see the changes.

Even so, there are still a variety of applicable uses for being able to mark cards, which I will go into below.


Genexwrecker wrote:That is a very convoluted way to take a simple attack modification note which you have a chat to write down


Not really. I would say that the only person this has been "convoluted" for is me, since I'm the one who went through the trouble of researching all of this javascript stuff, writing and tidying up all of this code, testing the code repeatedly with multiple different cards to make sure it works in all of those situations, and going back repeatedly to make any changes to the code and fix any errors I find within my code, all so you or anyone else didn't have to. You just have to do the easy part, which is copying and pasting the code into a saved bookmark, and you're good to go, while I took care of and handled the hard parts.

Right now, at the time of writing this, we have no way of knowing for certain when or if this whole coronavirus thing will get resolved. Until we do, playing yugioh anywhere but online simply isn't an option. Because of this, it makes sense to continue to look for new ways to improve and speed up the online experience for everyone.

Take, for instance, the declare feature that was officially implemented back in June. Now, players can simply click a button when they want to declare effect activations on the field, as opposed to typing "I activate X" or "I activate Y" repeatedly in the chat for every single activation, which is useful especially for combo-oriented players such as myself who tend to activate dozens of effects on the field in a single turn. Just a simple small thing like that made a huge difference, and also made the online experience better and faster for everyone.

There are a variety of applicable uses for being able to mark face-up cards in duels besides keeping track of the attack value of Apollousa, Bow of the Goddess.

Example 1: You have Breaker the Magical Warrior with a Spell Counter on it, but you also want to place a Guard Counter on it through the effect of Card Guard, also, both Venom Swamp and Cloudian Squall are face-up on the field, with an effect that will place a Venom Counter on Breaker the Magical Warrior during each end phase, and an effect that will place a Fog Counter on that Breaker the Magical Warrior during each of your standby phases, respectively.

With the ability to mark cards, you could simply place a counter on Breaker the Magical Warrior to indicate that it has a spell counter, and then mark Breaker the Magical Warrior so it says something like "gc 1, fc 3, vc 2," where "gc" means Guard Counter, "fc" means Fog Counter, and "vc" means Venom Counter, and you have those little numbers next to each of them to tell you how much of each of those counters are remaining on the card.

Image

Example 2: You just activated Swords of Revealing Light, and now you need to keep track of when it will destroy itself.

With the ability to mark cards, you can mark it each time the opponent's turn ends so you know how much time is left before it destroys itself.

Image

Example 3: You control Dark Snake Syndrome and you need to keep track of how much damage it will inflict during your next standby phase.

With the ability to mark cards, you can mark the next amount of damage it will inflict.

Image

Example 4: You have Petit Moth equipped with Cocoon of Evolution, and you need to keep track of how many turns passed since then so you know when you can summon Perfectly Ultimate Great Moth.

With the ability to mark cards, you can mark the amount of turns that have passed since then.

Image

Example 5: You activate the effect of Homunculus the Alchemic Being to change it's Attribute, and you need to keep track of it's new attribute.

With the ability to mark cards, you can mark it to show you it's new attribute.

Image

Example 6: You set Parasite Paracide face-down, and you also play Convulsion of Nature to turn both players' decks upside down.

Image

Your opponent summons Protron and attacks into your Parasite Paracide, causing it's effect to activate and put itself in your opponent's deck face-up and shuffle it.

Image

However, your opponent also has copies of Parasite Paracide of their own in their deck, which means your Parasite Paracide will get mixed up with theirs, and there won't be any way to distinguish between yours and theirs when they draw a Parasite Paracide.

With the ability to mark cards, you can mark your Parasite Paracide before putting it in their deck face-up, and then when they draw it, you immediately know it's yours since you marked it, so you can know that it's effect shall activate.


Image

greg503 wrote:Is this really better than writing in chat or otherwise mutually agreeing on how to communicate certain things?


These are just some common scenarios/examples where being able to mark cards would come in handy. Of course you can still insist on using the chat for all of this if you want, but the option to mark cards should at least be there for those to want them, just like how players aren't required to use duelingbook's declare button, but can if they want to, and should.

Genexwrecker
User avatar
Posts: 2145
Joined: Sat Feb 25, 2017 10:52 pm
Reputation: 360

Post #8 by Genexwrecker » Tue Sep 29, 2020 11:45 pm

those are all in game notes
you have a note pad above your avatar that has been kindly provided for you and a log of the note pad by the watchers chat icon.
Official Duelingbook Support staff
Official Duelingbook Resource Judge
Official Duelingbook Tournament Admin.(Other tournament Admin is Runzy)

james123
User avatar
Posts: 624
Joined: Sat Jul 08, 2017 3:56 am
Reputation: 60
Mood:

Post #9 by james123 » Thu Oct 01, 2020 8:18 pm

Genexwrecker wrote:those are all in game notes
you have a note pad above your avatar that has been kindly provided for you and a log of the note pad by the watchers chat icon.

We don't care because Coding Rules!

Christen57
User avatar
Posts: 1772
Joined: Sun May 07, 2017 10:37 pm
Reputation: 163
Location: New York, United States of America

Post #10 by Christen57 » Fri Oct 02, 2020 2:30 pm

Genexwrecker wrote:those are all in game notes
you have a note pad above your avatar that has been kindly provided for you and a log of the note pad by the watchers chat icon.


Okay, suppose you have multiple copies of Homunculus the Alchemic Being with different Attributes, multiple copies of Infernoid Decatron copying different Infernoid monsters, cards that place Venom Counters, cards placing Fog Counters, and cards that require you to keep track of how many specific phases/turns pass in order for certain effects to start triggering/applying? You think it's going to be easy using the chat for all of that?

It's going to eventually be too tedious when you have to keep saying repeatedly "This Homunculus on my left is fire and has both 2 Venom Counters and 1 Fog Counter, this Homunculus on my right is water and has both 1 Venom Counter and 2 Fog Counters, this Decatron closest to my extra deck is copying Devyaty and has a Fog Counter, this Decatron closest to my graveyard is copying Tierra and has 2 Fog Counters, this Decatron in the middle of those 2 aforementioned Decatrons is copying Onuncu and has 3 Fog Counters, this Dark Snake Syndrome will inflict 1600 damage during my next standby, it's been 7 turns since this Final Countdown was activated, 2 of my standbys passed since I played this Wave-Motion Cannon, there are 2 more of your turns left until Swords of Revealing Light destroys itself".

Then, after "communicating" all of that, both you and your opponent have to keep scrolling back up the already-cluttered logs to remember what is what, how many different counters are on what, and how much time/turns is/are left before certain effects do certain things and what will happen during this next standby and this next end phase, and, it's ultimately a big tedious mess when you can just simply mark stuff on the field so you see them without having to scroll up a big messy log to see things you need to keep track of. Every time you do something in the duel, it's recorded in the log, so when you record all of those things you need to keep track of in the log, a whole bunch of other actions are going to get mixed in with the records of what you need to keep track of, so you need to constantly scroll past all of that just to understand the full history.

If Final Countdown was involved in a duel, along with cards like Infernoid Decatron and Swords of Revealing Light, but the players couldn't use counters or something to keep track of how many turns were remaining and what was what, and instead had to rely solely on the logs, and then players started disagreeing over when Final Countdown would win a player the duel, what the Inernoid Decatrons were copying, and when Swords of Revealing Light would "expire," and called a judge to resolve everything, everyone including the judges would have to spend the next several minutes just scrolling through the log to see and read everything that happened until then, why it happened, when each player's turn ended, when Final Countdown was activated, when Final Countdown should win a player the duel, how many turns passed, which Infernoid Decatron actually copied what, when the Swords of Revealing Light was played, when that should "expire," and so on, all while scrolling through other random records things that happened in the duel such as players summoning monsters, activating other stuff, attacking with other stuff, and so on, thus making it take even longer just to see how many turns are left for Final Countdown to win someone the duel, what the Infernoid Decatrons were copying, the turns passing since Swords of Revealing Light was played, and so on, when it would be a lot easier to just mark things.

I've already demonstrated that it's already possible to mark face-up cards using some basic javascript, and I've already shown you that this is already a thing in other basic card game simulators like that one for magic the gathering. We just need this to be an official option on duelingbook, and make it so that, instead of just you being able to see the changes, which is currently the case with my javascript code, both players can see the changes too.

If I can program this into duelingbook in a matter of hours, so can duelingbook's developers, and they will certainly be able to do it better than I could too since they have far more control over duelingbook's codes/scripts/programming than I do.

Genexwrecker
User avatar
Posts: 2145
Joined: Sat Feb 25, 2017 10:52 pm
Reputation: 360

Post #11 by Genexwrecker » Fri Oct 02, 2020 5:26 pm

M1 deca is devyaty m4 deca is onuncu m3 deca is harmadik. Very easy
Official Duelingbook Support staff
Official Duelingbook Resource Judge
Official Duelingbook Tournament Admin.(Other tournament Admin is Runzy)

greg503
User avatar
Posts: 2062
Joined: Fri Mar 31, 2017 3:43 pm
Reputation: 174
Location: Flundereeze

Post #12 by greg503 » Fri Oct 02, 2020 7:03 pm

Just do what works for both players, it doesn't matter if we use counters to mark cards as long as we agree on it
Buy Floowandereeze

eyal282
Posts: 68
Joined: Wed Sep 23, 2020 6:02 pm
Reputation: 1
Location: Dustshoot Phase

Post #13 by eyal282 » Sun Oct 02, 2022 8:34 am

I'm unsure what's the ideal way to resolve this, as it is correct the current method is convoluted. It's not easy to fetch a card's attack from its effect automatically. I think I've tried to enable adding multiple counters on a card at once, with no success, to make each counter worth 100 ATK.


Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 54 guests