Eerie Code
2016-10-11T15:20:35Z
After seeing some cards online with effects that treat Xyz Monsters as having a Level for a Synchro Summon, I've been wondering if something like this could be implemented in Ygopro as well: however, I've been looking into the core functions, and the function Card.GetSynchroLevel, which would be necessary for a script like this, is set up so that the Synchro Level of an Xyz Monster is always treated as 0, regardless of other effects. Editing the core for a custom card is obviously unfeasable, but since I know from "Parasite Fusioner" that it's possible to override some functions in a card script without having to touch the utilities or other files, I've been wondering if I could do something like this:

function Card.GetSynchroLevel(c)
  if c:IsType(TYPE_XYZ) then
    --something still undefined to return the desired Level
  else 
    --returns the default GetSynchroLevel() in any other case
    return c:GetSynchroLevel() <--
  end
end

The line I marked with an arrow is the part that eludes me: is there a way to tell the system, at that point, to not call the override function I'm making, but rather the original version from the core? Is such a thing even doable in Lua?
Michael Lawrence Dee
2016-10-11T15:27:55Z
Well I wanted to do it too. As of now, the Synchro Summoning using Xyzs I have done online is only semi-hardcoded, it doesn't modify the core.

Some scripters suggested.

local f=Card.IsLevel
Card.IsLevel=function(c,lv)
if some condition then return some check
else return f(c,lv)
end

I'm not sure this function even exists. [:tongue:]
Now this is how I play:
Eerie Code
2016-10-11T15:52:15Z
It doesn't, the only functions similar to it are IsLevelAbove and IsLevelBelow. Even then it wouldn't work: the core functions used by the Synchro procedure use GetSynchroLevel, and with that function blocking Xyzs by default there's really no way to get around it without overriding it. How did you do it online?
Michael Lawrence Dee
2016-10-11T16:17:37Z
Originally Posted by: Eerie Code 

It doesn't, the only functions similar to it are IsLevelAbove and IsLevelBelow. Even then it wouldn't work: the core functions used by the Synchro procedure use GetSynchroLevel, and with that function blocking Xyzs by default there's really no way to get around it without overriding it. How did you do it online?



Added another procedure. 419 Token has like 3 procedures added within it.

I tried overriding GetLevel and GetSynchroLevel and IsSynchroMaterial (or something) in an offline card, it does detect Level, but still doesn't allow Synchro Summoning.
Now this is how I play:
[YOL]Edo9300
2016-10-11T18:42:11Z
unfortunately you cannot edit the core via lua, if the function doesn't allow extra filters, anyway for the xyz level i made a new effect that allows these things, and it should be added in the next update
Valossa
2016-10-11T19:37:21Z
you can edit core via C? some core files are written in C
Eerie Code
2016-10-11T19:48:54Z
So it can't be done at the moment, then... A shame, it would have been interesting to experiment with those kinds of effects. Thank you all for your help!
Gamemaster719
2016-10-17T03:36:32Z
well i need to start learning to edit core.. :/ come on edo teach us...
Michael Lawrence Dee
2016-10-17T03:57:42Z
Originally Posted by: Gamemaster719 

well i need to start learning to edit core.. :/ come on edo teach us...



Well..... I'm happy with lua overwriting for now. There are only little need for direct core editting like AttackTarget checking or 0 LP maintenance. First turn BP.
Now this is how I play:
Gamemaster719
2016-10-17T04:02:39Z
I just like learning but I still have a bot to do and a few other things.. Forums seem a bit slow...