Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels) 2013
Discard Deck and Lim-Dul's Vault
Moderator: CCGHQ Admins
Discard Deck and Lim-Dul's Vault
by libertyfighter » 28 May 2013, 14:49
Just a Discard Deck. It doesn't contains any text permanent AND it has the DIMIR image. You need the DLC with DIMIR.
PS I need to implement Lim-Duls Vault. But i have a lot of problem because i'm not very skilled on card implementation. If somebody can help me i will be grateful
PS I need to implement Lim-Duls Vault. But i have a lot of problem because i'm not very skilled on card implementation. If somebody can help me i will be grateful
- Attachments
-
- DECK_Discard01_102.zip
- (9.93 MiB) Downloaded 433 times
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Discard Deck and Lim-Dul's Vault
by thefiremind » 28 May 2013, 14:59
Whoa, Lim-Dûl's Vault is one hell of a card to make... don't feel frustrated if you can't code it. It will probably give some problems to me as well, but I should be able to get it done with some patience.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Discard Deck and Lim-Dul's Vault
by sumomole » 28 May 2013, 15:24
This's my code, but AI doesn't seem to like to use it, I really expect a version that AI like.
- Code: Select all
<RESOLUTION_TIME_ACTION repeating="1">
local n = MTG():GetActionRepCount()
local targetindex = n/3
local parity = n % 3
local filter = Object():GetFilter()
local player = EffectController()
local card = player:Library_GetTop()
local target_array = {}
if card ~= nil and Object():GetMultipleChoiceResult() == 0 then
if parity == 0 then
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_LIBRARY )
filter:SetPlayer( player )
filter:SetPortion( 5 )
player:SetTargetCount( 5 )
player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_FIRST_TOP_CARD" )
player:SetTargetPrompt( 1, "CARD_QUERY_CHOOSE_SECOND_TOP_CARD" )
player:SetTargetPrompt( 2, "CARD_QUERY_CHOOSE_THIRD_TOP_CARD" )
player:SetTargetPrompt( 3, "CARD_QUERY_CHOOSE_FOURTH_TOP_CARD" )
player:SetTargetPrompt( 4, "CARD_QUERY_CHOOSE_FIFTH_TOP_CARD" )
player:ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(targetindex) )
elseif parity == 1 then
player:BeginNewMultipleChoice()
if player:GetLifeTotal() > 0 and CountCardsInLibrary( player ) > 5 then
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ON_BOTTOM_LIBRARY" )
else
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ON_BOTTOM_LIBRARY", false )
end
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ONTO_LIBRARY" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_CHOOSE_MODE" )
else
if EffectDC():Get_Targets(targetindex) ~= nil then
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(targetindex):Get_CardPtr(i)
end
for i=0,4 do
if target_array[i] ~= nil then
target_array[i]:PutOnBottomOfLibrary()
end
end
end
player:LoseLife( 1 )
end
return true
else
if EffectDC():Get_Targets(targetindex) ~= nil then
player:ShuffleLibrary()
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(targetindex):Get_CardPtr(i)
end
for i=4,0,-1 do
if target_array[i] ~= nil then
target_array[i]:PutOnTopOfLibrary()
end
end
end
return false
end
</RESOLUTION_TIME_ACTION>
-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
Re: Discard Deck and Lim-Dul's Vault
by thefiremind » 28 May 2013, 15:59
I have put my version here (so we can always find all the requested cards in one topic, otherwise it's a big mess) but it suffers the same problem.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 721 times
Re: Discard Deck and Lim-Dul's Vault
by East Bay » 28 May 2013, 17:15
AI can't use combo cards what do you think they will get with Lim-Dûl's Vault? Couple basics or some Underground Seasumomole wrote:This's my code, but AI doesn't seem to like to use it, I really expect a version that AI like.
- Code: Select all
<RESOLUTION_TIME_ACTION repeating="1">
local n = MTG():GetActionRepCount()
local targetindex = n/3
local parity = n % 3
local filter = Object():GetFilter()
local player = EffectController()
local card = player:Library_GetTop()
local target_array = {}
if card ~= nil and Object():GetMultipleChoiceResult() == 0 then
if parity == 0 then
filter:Clear()
filter:NotTargetted()
filter:SetZone( ZONE_LIBRARY )
filter:SetPlayer( player )
filter:SetPortion( 5 )
player:SetTargetCount( 5 )
player:SetTargetPrompt( 0, "CARD_QUERY_CHOOSE_FIRST_TOP_CARD" )
player:SetTargetPrompt( 1, "CARD_QUERY_CHOOSE_SECOND_TOP_CARD" )
player:SetTargetPrompt( 2, "CARD_QUERY_CHOOSE_THIRD_TOP_CARD" )
player:SetTargetPrompt( 3, "CARD_QUERY_CHOOSE_FOURTH_TOP_CARD" )
player:SetTargetPrompt( 4, "CARD_QUERY_CHOOSE_FIFTH_TOP_CARD" )
player:ChooseTargets( NO_VALIDATION, EffectDC():Make_Targets(targetindex) )
elseif parity == 1 then
player:BeginNewMultipleChoice()
if player:GetLifeTotal() > 0 and CountCardsInLibrary( player ) > 5 then
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ON_BOTTOM_LIBRARY" )
else
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ON_BOTTOM_LIBRARY", false )
end
player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PUT_ONTO_LIBRARY" )
player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_CHOOSE_MODE" )
else
if EffectDC():Get_Targets(targetindex) ~= nil then
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(targetindex):Get_CardPtr(i)
end
for i=0,4 do
if target_array[i] ~= nil then
target_array[i]:PutOnBottomOfLibrary()
end
end
end
player:LoseLife( 1 )
end
return true
else
if EffectDC():Get_Targets(targetindex) ~= nil then
player:ShuffleLibrary()
for i=0,4 do
target_array[i] = EffectDC():Get_Targets(targetindex):Get_CardPtr(i)
end
for i=4,0,-1 do
if target_array[i] ~= nil then
target_array[i]:PutOnTopOfLibrary()
end
end
end
return false
end
</RESOLUTION_TIME_ACTION>
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Discard Deck and Lim-Dul's Vault
by libertyfighter » 29 May 2013, 15:15
About TEXT_PERMANENT.
I need to know some information. If i include in my DECK a folder named TEXT_PERMANENT and inside it i put my texts permanent XML files, it should work fine, because so happens in most of decks of other modders i studied.
But when i try to do that, my decks still don't have Name and my text permanent about DECK is not read at all.
Viceversa, some TEXT permanent as the one firemind put in the Lim Duls Vault , works really fine.
I seen the TEXT PERMANENT for a DECK NAME. It seems to me that the only job to do is to copy another TEXT permanent and adds rows with the name of the deck in the various languages.
There are some other links that i don't see??
The name of the TEXT PERMANENT FILE should be particular?
I beg your pardon for the noise i'm adding to you.
I need to know some information. If i include in my DECK a folder named TEXT_PERMANENT and inside it i put my texts permanent XML files, it should work fine, because so happens in most of decks of other modders i studied.
But when i try to do that, my decks still don't have Name and my text permanent about DECK is not read at all.
Viceversa, some TEXT permanent as the one firemind put in the Lim Duls Vault , works really fine.
I seen the TEXT PERMANENT for a DECK NAME. It seems to me that the only job to do is to copy another TEXT permanent and adds rows with the name of the deck in the various languages.
There are some other links that i don't see??
The name of the TEXT PERMANENT FILE should be particular?
I beg your pardon for the noise i'm adding to you.
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Discard Deck and Lim-Dul's Vault
by RiiakShiNal » 29 May 2013, 15:41
The name of the directory TEXT_PERMANENT must be TEXT_PERMANENT, but the names of the files inside it don't matter. The contents of the files do matter especially due to the namespaces that the file references.
For example this is a pretty minimal Text Permanent file:
It should also be noted that XML is CaSe SeNsItIvE, so "cell" != "Cell", "WorkBook" != "Workbook", etc.... Also the ss:Name, ss:Index, and ss:Type attributes are more than likely required as they are defined as required by the namespaces. Same with the xmlns attributes to define the namespaces.
The data in the first cell of each row (other than the header row) is the string defined for that row. It must be the same as the string you are trying to define(in uppercase). So if your Deck's filename is "D13_1234_My_New_Deck.xml" then the data in the first cell of the row should be "D13_1234_My_New_Deck". If you see a string in the game with [] around it it is because that string is not defined (or not defined properly).
Edited because apparently it doesn't uppercase deck names for the string look up.
For example this is a pretty minimal Text Permanent file:
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>DotP 2013 Deck Builder</Author>
<Created>2013-05-24T11:05:29Z</Created>
<Company>
</Company>
</DocumentProperties>
<Worksheet ss:Name="Sheet4">
<Table>
<Row>
<Cell><Data ss:Type="String">Ident</Data></Cell>
<Cell><Data ss:Type="String">Comment</Data></Cell>
<Cell><Data ss:Type="String">Master Text</Data></Cell>
<Cell><Data ss:Type="String">French</Data></Cell>
<Cell><Data ss:Type="String">Spanish</Data></Cell>
<Cell><Data ss:Type="String">German</Data></Cell>
<Cell><Data ss:Type="String">Italian</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">Japanese</Data></Cell>
<Cell><Data ss:Type="String">Korean</Data></Cell>
<Cell><Data ss:Type="String">Russian</Data></Cell>
<Cell><Data ss:Type="String">Portuguese (Brazil)</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">DECK_100045_NEW_DECK</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
<Cell><Data ss:Type="String">New Deck</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
It should also be noted that XML is CaSe SeNsItIvE, so "cell" != "Cell", "WorkBook" != "Workbook", etc.... Also the ss:Name, ss:Index, and ss:Type attributes are more than likely required as they are defined as required by the namespaces. Same with the xmlns attributes to define the namespaces.
The data in the first cell of each row (other than the header row) is the string defined for that row. It must be the same as the string you are trying to define
Edited because apparently it doesn't uppercase deck names for the string look up.
Last edited by RiiakShiNal on 29 May 2013, 16:41, edited 1 time in total.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Discard Deck and Lim-Dul's Vault
by libertyfighter » 29 May 2013, 16:18
So, my deck name is DECK_FammiGiocareUB_108 (the name of the XML DECK file)
I used your code like this.
There's some link i miss, maybe some OTHER file that have to refers to this Text Permanent file??
I used your code like this.
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>DotP 2013 Deck Builder</Author>
<Created>2013-05-24T11:05:29Z</Created>
<Company>
</Company>
</DocumentProperties>
<Worksheet ss:Name="Sheet4">
<Table>
<Row>
<Cell><Data ss:Type="String">Ident</Data></Cell>
<Cell><Data ss:Type="String">Comment</Data></Cell>
<Cell><Data ss:Type="String">Master Text</Data></Cell>
<Cell><Data ss:Type="String">French</Data></Cell>
<Cell><Data ss:Type="String">Spanish</Data></Cell>
<Cell><Data ss:Type="String">German</Data></Cell>
<Cell><Data ss:Type="String">Italian</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">Japanese</Data></Cell>
<Cell><Data ss:Type="String">Korean</Data></Cell>
<Cell><Data ss:Type="String">Russian</Data></Cell>
<Cell><Data ss:Type="String">Portuguese (Brazil)</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">DECK_FAMMIGIOCAREUB_108</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">Mancanza di tempo</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
There's some link i miss, maybe some OTHER file that have to refers to this Text Permanent file??
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Discard Deck and Lim-Dul's Vault
by RiiakShiNal » 29 May 2013, 16:39
This:libertyfighter wrote:So, my deck name is DECK_FammiGiocareUB_108 (the name of the XML DECK file)
I used your code like this.It is in a XML File in TEXT_PERMANENT folder. But i still have the deck name between square brackets [DECK_FammiGiocareUB_108]
- Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>DotP 2013 Deck Builder</Author>
<Created>2013-05-24T11:05:29Z</Created>
<Company>
</Company>
</DocumentProperties>
<Worksheet ss:Name="Sheet4">
<Table>
<Row>
<Cell><Data ss:Type="String">Ident</Data></Cell>
<Cell><Data ss:Type="String">Comment</Data></Cell>
<Cell><Data ss:Type="String">Master Text</Data></Cell>
<Cell><Data ss:Type="String">French</Data></Cell>
<Cell><Data ss:Type="String">Spanish</Data></Cell>
<Cell><Data ss:Type="String">German</Data></Cell>
<Cell><Data ss:Type="String">Italian</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">Japanese</Data></Cell>
<Cell><Data ss:Type="String">Korean</Data></Cell>
<Cell><Data ss:Type="String">Russian</Data></Cell>
<Cell><Data ss:Type="String">Portuguese (Brazil)</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">DECK_FAMMIGIOCAREUB_108</Data></Cell>
<Cell ss:Index="3"><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">Mancanza di tempo</Data></Cell>
<Cell ss:Index="9"><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
<Cell><Data ss:Type="String">No more Time</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>
There's some link i miss, maybe some OTHER file that have to refers to this Text Permanent file??
- Code: Select all
[DECK_FammiGiocareUB_108]
- Code: Select all
<Cell><Data ss:Type="String">DECK_FammiGiocareUB_108</Data></Cell>
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Discard Deck and Lim-Dul's Vault
by libertyfighter » 29 May 2013, 17:46
That is exactly what i done before opening this topic. Because nor in that way the text works.
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Discard Deck and Lim-Dul's Vault
by RiiakShiNal » 29 May 2013, 18:33
That could mean there is an issue where the game won't load it unless it is in all caps then. Have you tried making it all caps in the text permanent file AND making the deck filename all caps?
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Discard Deck and Lim-Dul's Vault
by libertyfighter » 29 May 2013, 22:59
Finally get rid of that.
So the name must be in uppercase AND the name of the TEXT PERMANENT file with the deck must have the same name of the deck xml file, except for DECK_ and TEXT_
That is at least what it seems
So the name must be in uppercase AND the name of the TEXT PERMANENT file with the deck must have the same name of the deck xml file, except for DECK_ and TEXT_
That is at least what it seems
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
13 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests