Page 1 of 1

Hiding the score you get from killing NPCs

Posted: Mon Aug 05, 2019 1:50 am
by Reign
The title basically. When you kill an npc, you get a certain amount of points. If you kill multiple enemies, you also get life-ups. I want to disable both of them for visual reasons. When you kill an npc, the npc should just get killed and no points or 1/2-ups should be visible.

I'm not sure which hardcoded graphics the score uses, but I can't make font 2 or 3 invisible, because other things in the episode use these fonts. Is there an easy way to do this in lua?

Re: Hiding the score you get from killing NPCs

Posted: Mon Aug 05, 2019 3:26 am
by Enjl
Score doesn't use hardcoded graphics, it uses effect-79.
To disable an npc's inherent score, set the "score" npc config variable to 0.
To disable the combo counter, use this code:

Code: Select all

--this sets the score counter to 0 to prevent 1ups
--redigit stores this in NPC 0
local function dummyNpcMem(offset, value, set)
    return mem(readmem(0xB259E8, FIELD_DWORD) + 0xac00 + offset, value, set)
end

function onTick()
	player:mem(0x56, FIELD_WORD, 0)
	dummyNpcMem(0x24, FIELD_WORD, 0)
end

Re: Hiding the score you get from killing NPCs

Posted: Mon Aug 05, 2019 4:43 am
by Reign
Enjl wrote:
Mon Aug 05, 2019 3:26 am
Score doesn't use hardcoded graphics, it uses effect-79.
To disable an npc's inherent score, set the "score" npc config variable to 0.
To disable the combo counter, use this code:

Code: Select all

--this sets the score counter to 0 to prevent 1ups
--redigit stores this in NPC 0
local function dummyNpcMem(offset, value, set)
    return mem(readmem(0xB259E8, FIELD_DWORD) + 0xac00 + offset, value, set)
end

function onTick()
	player:mem(0x56, FIELD_WORD, 0)
	dummyNpcMem(0x24, FIELD_WORD, 0)
end
Thanks a lot!