get enemy level (enemy)?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
LieMurderProfit
Slime
Posts: 20
Joined: Mon Feb 13, 2017 10:28 am
Location: Moscow

get enemy level (enemy)?

Post by LieMurderProfit »

Is there a way of determining the enemy level?

I'd like to display the enemy level (before the battle) so the player can run away if the enemy is too strong.

similar to: get hero level (who)
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Enemies don't have levels, but you could use these commands http://hamsterrepublic.com/ohrrpgce/doc ... 0Functions

To make some estimate of enemy formation strength... You could even take an unused stat like "CTR" and use that to put a number indicating enemy danger level
LieMurderProfit
Slime
Posts: 20
Joined: Mon Feb 13, 2017 10:28 am
Location: Moscow

Post by LieMurderProfit »

I was hoping for something shrinkwrapped, like a script to save me from math :-) Thanks for the quick reply.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Instead of calculating the strength of a formation based on the enemies in it, an alternative is to just manually specify a level for each formation. You can't specify it in the formation editor, instead you need to put a lookup-table in the instead-of-battle script, like so:

Code: Select all

plotscript, the instead of battle script, formation, formation set, begin
  variable(level)
  switch (formation) do (
    case (0)  level := 1
    case (1)  level := 1
    case (2)  level := 2
    case (3)  level := 3
    case (4)  level := 2
  )
  #show a textbox + choice...
end
Last edited by TMC on Wed Feb 15, 2017 8:52 am, edited 1 time in total.
Post Reply