Battle Chasers: Nightwar [Engine:Unity]

Upload your cheat tables here (No requests)
Post Reply
User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Battle Chasers: Nightwar [Engine:Unity]

Post by SunBeam »

Game Name: Battle Chasers: Nightwar
Game Vendor: Steam
Game Version: v24037 [ see top-right at main menu ]
Game Process: BC.exe



Been a while since I posted a table, so I decided to go big :) I've been playing this game for 1-2 weeks now, quite entertaining, with only Debug Keys enabled. Aside from that, there's a bunch of DEVELOPER COMMANDS which I found worth investigating. The internet doesn't contain a lot of information on them, neither the 1-2 topics here on FRF. Some are simplistic and to the point, some require some extensive knit-picking and diving into Unity's .assets and .dlls :)

Let it be known upfront that this topic is not about the usual options you've seen in trainers or tables. If you're looking for that, please find a different topic/table/trainer to suit your needs. You WON'T FIND IT HERE. So don't go "not working, please update", as you'll be ignored. The purpose of this topic is to have a go at some aspects in a different way and maybe you'd learn a few things in the process. The reason I've decided to do this -- to answer several questions:

a) Why don't I train Unity games? R: Because, as you will see, Unity games are SIMPLE to train. There's no freakin' magic behind it once you are equipped with several tools that help you in the process.

b) How did you figure out this and that? R: Well, common sense and mostly googling. Plus applied human logic to get from point A to point B to point C and so on. Again, it's not something only knowledgeable people can do: it's something YOU too can do! So don't go "yeah, but you know this shit, you have the knowledge".

Since I foresee some crappy replies, here's a dedicated paragraph: 1) "but this game is old, nub": It is. Although I don't like Unity, I liked the game's logic/mechanics. Reminds me of Disciples series. Plus what you're about to read isn't on any forum. 2) "while you train old games, I trained 293872198 AAA+ games": I don't train games. I don't do it for a living. So take that logic someplace else. You know who you are.

Alright, let's get to it.

---------------------------------------------
DEBUG KEYS / DEVELOPER CONSOLE
---------------------------------------------

As Csimbi mentioned here, you can enable the Debug Keys and Developer Console in this game. Before finding the various topics on FRF, I went my usual way, which I will explain below. The tools you'll need to deal with Unity games are many in numbers. I prefer Telerik JustDecompile which you can download [Link]. That, plus Cheat Engine 7.1+. We'll be using some other tool a bit later, but that's just because of a certain necessity. We'll talk about it when I get to it.

Having JustDecompile open, you'll want to open up Assembly-CSharp.dll, which can be found in the game folder (e.g.: F:\SteamLibrary\steamapps\common\Battle Chasers Nightwar\BC_Data\Managed). This will be your usual approach with ANY Unity game. Open up the Assebly-CSharp.dll and start searching for shit :) Which is what I did as well; here's an example:

Image

If you look for 'debugkeys', you will see the following:

Image

You can see on the first column a function name: HandleDebugKeys. On the 3rd column a method called Update(). Inspecting the first HandleDebugKeys (Method Call) in the list -- the 2nd entry, bottom-to-top, in the image above -- we see this:

Image

So:

Code: Select all

private void Update()
{
	this.HandleDebugKeys();
	foreach (CombatEventParams currentCombatEvent in this.currentCombatEvents)
	{
		currentCombatEvent.enabled = !this.suppressCombatEvents;
	}
	if (this.state == BattleManager.State.Active)
	{
		this.Update_Active();
	}
	else if (this.state == BattleManager.State.Complete || this.state == BattleManager.State.WaveTransition)
	{
		this.Update_Inactive();
	}
}
The Update method is the most sought for method because, if hooked, you will get the instance pointer this method.. updates :) It's like hooking for Player or Inventory or Weapon and getting it from that Update method of a certain type name. Not that I'm not Unity-savvy, so if I'm making some mistakes in my explanations, feel free to suggest corrections. I won't mind.

From here, let's see what HandleDebugKeys does:

Image

Code: Select all

private void HandleDebugKeys()
{
	if (GameKey.GetDebugButtonDown(this.playerInput, 28))
	{
		CombatFighter fighterUnderCursor = this.GetFighterUnderCursor();
		if (fighterUnderCursor != null && fighterUnderCursor.IsAlive() && !fighterUnderCursor.IsPerformingAction())
		{
			fighterUnderCursor.GotHit(null, fighterUnderCursor.stats.health * 2f, CombatFighter.ImpactType.Heavy, false, false, true, CombatFighter.DamageType.Physical, null);
		}
	}
	if (GameKey.GetDebugButtonDown(this.playerInput, 30))
	{
		CombatFighter combatFighter = this.GetFighterUnderCursor();
		if (combatFighter != null && combatFighter.IsAlive() && !combatFighter.IsPerformingAction())
		{
			float single = Mathf.Min(combatFighter.stats.maxHealth * 0.15f, combatFighter.stats.health * 0.5f);
			single = Mathf.Max(single, 1f);
			combatFighter.GotHit(null, single, CombatFighter.ImpactType.Heavy, false, false, true, CombatFighter.DamageType.Physical, null);
		}
	}
	if (GameKey.GetDebugButtonDown(this.playerInput, 31))
	{
		CombatFighter fighterUnderCursor1 = this.GetFighterUnderCursor();
		if (fighterUnderCursor1 != null && fighterUnderCursor1.IsAlive() && !fighterUnderCursor1.IsPerformingAction())
		{
			float single1 = Mathf.Min(fighterUnderCursor1.stats.maxHealth * 0.05f, fighterUnderCursor1.stats.health * 0.5f);
			single1 = Mathf.Max(single1, 1f);
			fighterUnderCursor1.GotHit(null, single1, CombatFighter.ImpactType.Light, false, false, true, CombatFighter.DamageType.Physical, null);
		}
	}
	if (GameKey.GetDebugButtonDown(this.playerInput, 33))
	{
		this.ToggleGodMode();
	}
}
So.. what the code above says.. if you have the Debug Keys active and press certain keys (I later discovered, from searching through the Assembly-CSharp.dll file content, these are F1, F2, F3, .. or something), you can trigger various effects. Like ToggleGodMode.

How do I know I have Debug Keys active? I don't. For now. But I can do a further dive into the function that runs when you press the keys I mentioned above. That function: GetDebugButtonDown. Goin in, we see this:

Code: Select all

public static bool GetDebugButtonDown(Player playerInput, int actionId)
{
	if (!ReInput.isReady || playerInput == null || !Singleton<GlobalVars>.Instance.debugKeys)
	{
		return false;
	}
	return (!playerInput.GetButtonDown(actionId) ? false : playerInput.GetButton(4));
}
Image

The reason I'm indicating stuff with arrows and marking regions in red rectangles is so you pay attention to the details so you'd know how to get to these spots when you enable Mono in Cheat Engine. From the function above we see that GetDebugButtonDown checks for several things before actually allowing normal execution. One of the things it checks for is Singleton<GlobalVars>.Instance.debugKeys. Which is what we want to intercept and patch.

Alright. So far so good, let's get Cheat Engine open. Target the game, then run Mono > Activate mono features from main CE window:

Image

If you remember all those arrows in the previous images and red rectangles:

Image

So we want to check BC:GameKey:GetDebugButtonDown function. Open Memory Viewer, then Ctrl+G and type in or paste the name of the function I just mentioned. Hit OK and you're there:

Image

Now if we cross-reference the above with our C++ code:

Code: Select all

public static bool GetDebugButtonDown(Player playerInput, int actionId)
{
	if (!ReInput.isReady || playerInput == null || !Singleton<GlobalVars>.Instance.debugKeys)
	{
		return false;
	}
	return (!playerInput.GetButtonDown(actionId) ? false : playerInput.GetButton(4));
}
We get this:

Image

The ASM equivalent of each of the components in that function.

So my enablement script looks like this:

Code: Select all

{$STRICT}

{$lua}

if syntaxcheck then return end

function string.fromhex( s )
  return ( s:gsub( '..', function ( cc )
    return string.char( tonumber( cc, 16 ) )
  end ) )
end

function aobScanSmall( aob, s, e )
  local i = byteTableToString( readBytes( s, e, true ) ):find( string.fromhex( aob ), 1, true )
  if i == nil then i = 1 end
  return ( s + i - 1 )
end

local _script = [[[ENABLE]

  label( hk_GetDebugButtonDown_o )
  registersymbol( hk_GetDebugButtonDown_o )
  label( pInstance )
  registersymbol( pInstance )

  GetDebugButtonDownHook:
  mov [pInstance],rax
  db C6 80
  readmem( hk_GetDebugButtonDown+3, 4 )
  db 01
  hk_GetDebugButtonDown_o:
  readmem( hk_GetDebugButtonDown, 7 )
  jmp hk_GetDebugButtonDown+7

  align 10 CC

  pInstance:
  dq 0

  align 10 CC

  hk_GetDebugButtonDown:
  jmp GetDebugButtonDownHook
  nop 2

]]..[[[DISABLE]

  hk_GetDebugButtonDown:
  readmem( hk_GetDebugButtonDown_o, 7 )

  [pInstance]+1B6:
  db 0

]]

[ENABLE]

LaunchMonoDataCollector()

local addr = getAddressSafe( "BC::GameKey::GetDebugButtonDown" )
if addr == nil then stopExec( "GetDebugButtonDown not found!" ) end
addr = aobScanSmall( "0FB680", addr, addr + 0x100 )
unregisterSymbol( "hk_GetDebugButtonDown" )
registerSymbol( "hk_GetDebugButtonDown", addr, true )
local mem = allocateMemory( 0x1000, addr )
unregisterSymbol( "GetDebugButtonDownHook" )
registerSymbol( "GetDebugButtonDownHook", mem, true )

result, disableinfo = autoAssemble( _script )

[DISABLE]

autoAssemble( _script, disableinfo )

local mem = getAddressSafe( "GetDebugButtonDownHook" )
deAlloc( mem )

autoAssemble([[
  unregistersymbol( pInstance )
  unregistersymbol( hk_GetDebugButtonDown_o )
  unregistersymbol( GetDebugButtonDownHook )
  unregistersymbol( hk_GetDebugButtonDown )
]])
I really hope you won't ask how to turn the above into a script that can be enabled in CE T_T.. Honestly, read around and learn how to.

What the script does is to enable Mono automatically when you activate it. Then it gets to the address of BC:GameKey:GetDebugButtonDown (you can use :: as well, not just :) from its symbol. If not found, it will error out and let you know something's off (usually.. Mono didn't get enabled or something happened in-between). If the address is found, then I make it scan for the first (and only) occurrence of "0FB680". Which is this line:

Code: Select all

BC:GameKey:GetDebugButtonDown+4b - 0FB6 80 B6010000      - movzx eax,byte ptr [rax+000001B6]
Why? Because the "debugKeys" BOOL property we want to patch from 0 to 1 is at that line. That's where it's read constantly and also where we can patch it ;)

And the reason I do a scan like that is I am not 100% sure Unity will assemble (or JIT -- just-in-time compile) the ASM code in the same way every single time. As such, just to be sure, I'm scanning for a small array of bytes to find the spot accurately. The scan is done between function's prologue and prologue + 0x100 bytes. It's a big enough range. Once found, I unregister a symbol I want to apply before applying it (just to make sure it's not already registered).

Then comes allocation of memory where the ASM _script will be assembled. I called it GetDebugButtonDownHook.

Lastly, the autoAssemble will assemble the code in _script and hook 'BC:GameKey:GetDebugButtonDown+4b' we found earlier. All in all, it looks like this:

Image

Image

Once you enable the script, you will see this in-game:

Image

So now we know Debug Keys are enabled. However, since the developers removed the debug key associations from the encoded ReInput table in Rewired_Core.dll, those F1-F3 key presses won't work to do what I mentioned in the beginning of this topic. However, if you press Tilde (~`) key, you will see this:

Image

So that's what I did in my table to enable the console. Additionally, in the table below, you will also find a script that kills the Arena timer, so you can play those waves for as long as you want :)

Image

BC.CT
(21.02 KiB) Downloaded 298 times

Part two, the goodies, in the next post.

BR,
Sun

How to use this cheat table?
  1. Install Cheat Engine
  2. Double-click the .CT file in order to open it.
  3. Click the PC icon in Cheat Engine in order to select the game process.
  4. Keep the list.
  5. Activate the trainer options by checking boxes or setting values from 0 to 1

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Re: Battle Chasers: Nightwar [Engine:Unity]

Post by SunBeam »

---------------------------
CONSOLE COMMANDS
---------------------------

As with any console you've tried in your life, developers would leave in some references. Usually, help or list, listcmds, etc. Stuff like that. In this game, if you type in help, you will be presented with the following list of commands:

Code: Select all

> help
Available commands:

achievement_remove             Remove the specified achievement id.
achievement_remove_all         Remove the all achievements.
achievement_unlock             Unlock the specified achievement id.
achievements                   List all achievements.
activate_perk                  [fighter_id] [perk_id] - activates the given perk
add_enchanted_item             Usage: add_enchanted_item [id] [enchantIdd] - Add item with id enchanted with enchantId to inventory.
add_hero                       Add a hero to your party
add_hero_xp                    Add specified xp to hero if in party. Usage: [Hero ID] [XP to add]
add_item                       Usage: add_item [id] [OPTIONAL: number] - Add number of item with id to inventory.
add_tutorial                   usage: add_tutorial [id] - adds the specified tutorial to list of unseen tutorials
analyze_dungeon                Run analysis on specified dungeon template. analyze_dungeon [template name] [number of tests]
autoequip                      Equip everyone in your party with level-appropriate test gear.
bind                           Syntax: 'bind <key> <command>' Bind a console command to a key
catch_all_fish                 Unlocks all hero skins
clear                          Clear a global string variable
clear_dungeon_seeds            Clears all saved dungeon seeds.
clear_graphics_settings        Clears all graphics settings from playerprefs.
clear_inventory                Remove all from inventory
clear_steam_achievements       Clear all steam achievements.
clear_tutorials                Clears all pending tutorials
combat_hurt_fighter            Hurt fighter.
combat_kill_fighter            Kill fighter.
complete_all_objectives        Complete all ObjectiveRecords
complete_objective             Makr an ObjectiveRecord completed
complete_story                 Complete story for current save and save value
control_art_refresh            Refreshes all control art
craft_item                     Create item if possible and add to player inventory.
cycle                          Set a global variable to each in a list of values
debug_airship_ui               Print out current focus, all UI root layers currently active and their last focused element
debug_dungeon_camera
debug_fsms                     Show all FSMs currently running and what state they're in
disable_combat                 Disable dungeon AI from entering turn-based combat mode.
drain_mana                     Drain all mana from given hero (or all)
end_fade                       Stuck faded to black? Use this!
enter_dungeon                  Enter dungeon. Usage: [Dungeon Name]
equip_hero                     Attempts to equip hero with all specified items. Usage: [Hero id] [item 1] [item 2] [...]
equip_lure                     Equip a lure from your inventory into a slot
equip_rod                      Equip a rod from your inventory into a slot
exit                           Exit the game.
exit_dungeon
force_to_main_menu
gc
get                            Get current value of global variable
get_all_code_rewards           Get all code rewards.
get_dungeon_map
get_string                     Show a localized string, given its key
get_treasure_map 
give_all_ingredients           Give the player all the required ingredients for the selected recipe in the Crafting UI
give_gold                      Add specified gold amount to player inventory. Usage: [Amount of Gold to give]
give_items                     Add all specified items to player inventory. Usage: [item 1] [item 2] [item 3] [...]
give_shadow                    Add specified shadow coin amount to player inventory. Usage: [Amount of shadow coin to give]
help                           View available commands as well as their documentation.
hero_max_perks                 Gives hero max perks. Usage: hero_max_perks [heroId]
heroes_max_perks               Gives all heroes max perks.
hurt                           Do some damage to all party members.
hurt_hero                      Do damage to one hero.
inc_gameplay_stat              Increment a gameplay stat by amount
instance_detail_report         Creates a report with information about some object instances.
instance_report                Creates a report with information about some object instances.
inv                            List inventory
kill_all_ai                    Kill all AI in current room.
kill_dialogue                  Clear dialogue popup.
leak_fighterstats
learn_all_recipes              Learn all possible recipes
learn_recipe                   Learn a recipe
list_dungeon_flags             Show all current dungeon's save flags.
load                           Load a scene with the given name.
load_config                    Execute a config file immediately.
load_level                     Load scene. Usage: load_level [scene name] [asset bundle name]
lock_hero                      Lock a hero
lock_recipe                    Lock a recipe
map_select_pending_scene       Used only for map select configs.
material_report                Creates a report with information about all loaded materials.
max_limit                      Sets your party limit to the max
null_exception
object_report                  Creates a report with information about all loaded Objects.
objectives                     Show all objectives and their state
party                          List party members
pause_ai_logic                 Set the pause state on AI logic.
play_movie_test                Plays a test movie
print_blinkstations            Print Blinkstation positions.
print_flags                    Print all gameplay flags and corresponding values.
print_hero_refcount            Print all gameplay flags and corresponding values.
print_input_schemes            prints the input schemes currently enabled
raise_level                    Increase the party members' level by one.
reload                         Reload the current scene
reload_loc                     Reload all loc strings
remove_hero                    Remove a hero from your party
remove_item                    Remove an item from inventory
remove_tutorial                usage: remove_tutorial [id] - removes the specified tutorial from list of unseen tutorials
report_scene_hierarchy
res                            List supported fullscreen resolutions on this device
reset                          Reset the save game file.
reset_all_dungeons             Clears the save state on all dungeons.
reset_perk_points              Resets hero perks to number appropriate to current level
reset_vendor_inventories       Clear all vendors so they repopulate properly based on your tags and levels
resource_report                What the ResourceSystem has loaded.
restore_party                  Heals all heroes back to full.
save                           Save our save profile
save_current_dungeon           Saves current dungeon if one exists and is active.
save_print                     List information about current save profile
scriptable_report              Creates a report with information about all loaded ScriptableObjects.
set                            Set a global variable
set_audio_language             Set current audio language
set_dungeon_seed               Usage: set_dungeon_seed [dungeon id] [seed value]
set_hero_level                 Usage: [Hero ID] [level]
set_heroes_level               Set the level of all heroes in party. Usage: [level]
set_language                   Set current game language
set_save_flag                  Set a save flag
show_craftable                 Show recipes that can be crafted based on current inventory.
stats                          Show stats for the given hero
texture_report                 Creates a report with information about all loaded textures.
toggle_dungeon_lights          Toggle all dungeon lights.
toggle_dungeon_particles       Toggle all dungeon particle systems.
toggle_dungeon_shadowcasting   Toggle all dungeon light shadowcasting.
toggle_room_particles          Toggle all room particle systems.
turn_in_fish                   Turns in fish for shadow coin
unbind                         Syntax: 'unbind <key>' Unbind a console command from a key.
unload_unused_assets
unlock_all_bestiary            Unlocks all creatures in the Bestiary with all info
unlock_all_lore                Unlocks all lore/lore chains in game
unlock_all_skins               Unlocks all hero skins
unlock_all_world_map           Visit all map nodes in World Map and unlock Blinkstations.
unlock_codex                   Unlocks all codex entries
unlock_hero                    Unlock a hero
unlock_lore_piece              Unlocks lore piece
unlock_map                     Unlock all world map nodes and connecting paths.
unlock_objective               Unlock an ObjectiveRecord
unlock_perk_point              Unlock perk point reward record
unlock_progression             Usage: unlock_progression [recordId]
update_vendors                 Update vendors by a certain number of days
vendortest                     Test for vendor
worldmap_teleport_center       Teleport to the center node on the world map.
wwise_event                    Post a wwise event
The problem, in-game, is these are presented in a truncated list. If you want to learn information about a specific command, just type in help <command> (e.g.: help achievement_remove). And you will see the full description.

--------------------------
bind + restore_party
--------------------------

Now.. some of these commands are straight forward to use. Others -- that am sure are already glittery in your eyes -- require a bit more research. I can tell you that the only ones I've used so far are these:

1) bind <key> <command>
2) restore_party

What I usually do is this: run game, open CE, target process, open cheat table, enable the 2 scripts. Back in-game, Tilde to open the console. Then:

bind PageUp restore_party

I do not know or have handy a list of key names, but you can logically list them out. Just look at your keyboard and type them in as strings (e.g.: bind F1 <command>).

Back.. This guarantees that whenever I use PageUp key for the duration of the game session, I will basically run restore_party command. Which restores HP and Mana for my entire party. A few things to keep in mind:

> This will reset your Overcharge.
> This will heal fallen heroes (even though you can't play with them, they will have health restored to full and enemies might target them :)). The problem here is you won't be able to revive them! So.. revive them first, then press the key to heal whole party up.
> You can hit PageUp in-between enemy hits, which will fill HP up and prevent you from dying.
> DO NOT RUN THIS WHILE PERFORMING YOUR LAST MOVE IN A FIGHT! Why: the UI will become inactive for some reason and you won't be able to press Esc or E to exit the fight. You were warned!

And yes, you will need to set this up every time you open the game, as it's not stored in some configuration file.

--------------
give_items
--------------

Another interesting command -- which got me writing all of this -- is give_items :) The description simply says:

Code: Select all

Add all specified items to player inventory. Usage: [item 1] [item 2] [item 3] [...]
The command takes in only 1 parameter or a list of them. As you will see, these are strings. So.. how to find them? There's no console command that would give you a list of them. Where to get (to) them then? Which brings us to the additional tool I said I'd mention in the beginning of this topic.

Started with JustDecompile searching for anything related to: item, loot, weapon, rarity. And found several functions, but no lists whatsoever. The command needs and item string id. So then I decided to search in memory, with CE, for strings. I looked in my inventory and saw an item: Infused <bla> Crystal. Looked for 'infused', then for 'crystal', but the results didn't prove useful. Am detailing all of this just so you understand the thought process. Trying systematically to create connections between what's laid in front of you, the tools and elements.

So I said "let's see what's in the game folder". If there's some list somewhere, it will surely be in there. Inside one of those files:

Image

Yeah, I've never worked with Unity data. I know it's pretty much always looking like this, the framework, cuz I've seen other games. So how to access the content of whatever's in there and inspect it? Which led me to GOOGLE. Where I searched the following:

unity extract assets

Image

Why did I search for that? Simple. Look in the game folder (BC_Data folder). See all those files with .assets extension? That's why. Again, I've never worked with Unity files, so the only logical connection here is seeing file extensions and asking google about it. Anyone can do that, right? You don't need to be some computer genius to pick up on that lead.

So I downloaded that tool: Unity Assets Bundle Extractor -> [Link]

You may want to check the [Link] page if newer builds are posted. Just saying I directly linked the latest at the time of writing this post.

I've never used it. But for as long as we live, we keep learning :) Hence the tool:

Image

With it I started opening up all the files I thought would contain useful information. Goal: finding an item or loot table containing the strings we need for our command :) Here's how one such file opened up in the tool looks like (e.g.: resources.assets file):

Image

After browsing each file in that info tab, I could find some leads, but not lists. For example, when I did the string scans with CE, I found some locations in memory that showed this:

Image

loot/garden_loot_tier_4/garden-loot-table-minor-1-star

So where the hell are those and how do they look like? From the way the string contains /, you can tell it's folder path. "loot" is the first one, "garden_loot_tier_4" is the second one, "garden-loot-table-minor-1-star" would be a third one. But where are these?

So I continued looking at the data files and found those paths stored in globalgamemanagers file:

Image

Inspected several, but that didn't give me any leads to some list. I KNOW THERE HAS TO BE A LIST SOMEWHERE IN SOME SIMPLISTIC FORMAT :D

Once I was done with the data files, I decided to go into StreamingAssets/AssetBundles/Windows/ folder. Just to see if the tool is able to open and parse anything in there. This is how the folder looks like and this is what I stopped at, after inspecting all of them:

Image

Why? Well.. that file seems to be telling me "if there are no lists anywhere in the other locations you've inspected, then maybe I'm keeping everything in the 'records' file" :) Opened it up and saw this:

Image

Hit Yes. Then you're asked to provide a folder to save the unpacked file in:

Image

So I just gave it a name: records_unpacked. You will now see a new file on disk, in that location:

Image

Then the window closes and you see this:

Image

Click the Info button and you're shown this:

Image

Let me explain what you're looking at: an archive containing plain text files (CSV files). Given their names, you can obviously deduct what they're about, correct? :) So I've extracted the one that's highlighted: ItemRecords. Just click the Export Raw button (since its state in the archive is CSV, there's no point dumping it in some other format? I hope you apply this simplistic logic when you check your shit). And save it as ItemRecords.csv. The tool will save it with .dat extension, but just F2 on the file and remove that:

Image

Now open the file (I have Excel installed, so it's easier to inspect the columns) and you will see this:

Image

In here you'll find the string values you need to feed as parameters to the give_items command :) I've attached below the original .csv file, as well as the .xlsx transformed one. I've cleaned up the header a bit and removed all blank/irrelevant rows. Why xlsx? Because you can apply filters which get saved in the file.

ItemRecords.zip
(90.85 KiB) Downloaded 126 times

You can do the same with every other .csv file in the 'records' data file.

So now, in the Excel file, if you filter P column (defaultRarity) by 'Rarity4' value, you will see several entries. I chose the rod and lure :)

Image

So you'd go type in: give_items rod-t4-collector lure-t4-collector [Enter]

If you remember, you can type more than 1 item on that line, separated by a space character.

And you get both items :P

Image

Image

I didn't even start the game and I already have the most powerful rod/lure in the game. Muhaha!

-------------
add_item
-------------

If you want to add certain amounts of an item and can't be arsed using give_items multiple times, just go: add_item <string_name> <quantity> (e.g.: add_item mat-parts-t1 100 -- gives you 100 Common Parts).

"Hey, how do you know 'mat-parts-t1' stands for 'Common Parts'? It's not in the Excel."
R: Trial and error. You have a column called "type". Filter it by "Crafting". Then take each "id" and use add_item with it. Have the inventory open and do "add_item <name> 999". That will show you fast what is it you added:

Image

Image

More, later, if I feel like the information is worth the trouble.

BR,
Sun

User avatar
SunBeam
Administration
Administration
Posts: 4932
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4630

Re: Battle Chasers: Nightwar [Engine:Unity]

Post by SunBeam »

And here's the rest of them I found useful:

Image

records.zip
(472.55 KiB) Downloaded 119 times

BR,
Sun

User avatar
Snowbunny
Cheater
Cheater
Posts: 30
Joined: Fri Apr 23, 2021 6:21 pm
Reputation: 3

Re: Battle Chasers: Nightwar [Engine:Unity]

Post by Snowbunny »

Hey, just wanted to thank for sharing this. I'm not a coder by any means and I certainly couldn't follow along with everything, but I was able to understand the process and know that this will be an amazingly helpful guide to learning/practicing with mono and figuring out the steps to parse the disassembled code and apply it to a game. Looks to me like invaluable info for anyone even barely intermediate with CE (I simply haven't moved past basic searching, should probably locate some good tutorials/scenarios sometime.)

So, yeah, thanks for sharing the breakdown man. :)

Post Reply

Who is online

Users browsing this forum: AhrefsBot, Baidu [Spider], Bing [Bot], DarkEmperorReborn, Google Adsense [Bot], kisskhan, Leunsel, Lootie_McShootie, melchokolate, minimonster, romago13, TipTopTam