It is currently 19 Jun 2025, 15:50
   
Text Size

How do I change / assign starting life totals?

New decks and cards for Stainless Games' release

Moderator: CCGHQ Admins

How do I change / assign starting life totals?

Postby Kieran » 07 May 2013, 07:03

So, I've decided that my initial life total and that of the AI needs to change in their favor because I want to begin challenging myself by starting off with 15 and let them start with 40. Anyone know where to change this value?
Kieran
 
Posts: 232
Joined: 03 Nov 2012, 01:09
Has thanked: 21 times
Been thanked: 16 times

Re: How do I change / assign starting life totals?

Postby thefiremind » 07 May 2013, 09:09

There's a file in the original core WAD:
DATA_CORE\DATA_ALL_PLATFORMS\CONFIGS\GENERAL_CONFIG.XML
that you could copy inside another WAD file (never edit the original core WAD directly or you could screw the campaigns) and edit, so that it overrides the original one. The problem is that it changes the starting life totals for everyone, which is not what you want.

The only way to change life totals differently for AI and non-AI, as far as I can think of, would be to add an ability to a card in one of the decks, something like this:
Code: Select all
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    -- This is probably the earliest trigger you can get
    return MTG():GetStep() == STEP_UPKEEP and MTG():GetTurnNumber() == 0
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    for i=0,MTG():GetNumberOfPlayers()-1 do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          if player:IsAI() ~= 0 then
             player:SetLifeTotal(40)
          else
             player:SetLifeTotal(15)
          end
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: How do I change / assign starting life totals?

Postby Kieran » 07 May 2013, 10:30

As always, the Firemind's Foresight hath given me yet another exploit. Thanks! Your contributions and the wealth of information you share are astounding.
Kieran
 
Posts: 232
Joined: 03 Nov 2012, 01:09
Has thanked: 21 times
Been thanked: 16 times


Return to Magic: The Gathering - Duels of the Planeswalkers

Who is online

Users browsing this forum: No registered users and 14 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 14 users online :: 0 registered, 0 hidden and 14 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 14 guests

Login Form