Jump to content


Photo

Difficulty setting


  • Please log in to reply
8 replies to this topic

#1 Penna

Penna
  • Member
  • 16 posts

Posted 30 January 2011 - 08:49 AM

I was wondering whether the effects of difficulty settings are hardcoded for I want to do some modifications (monster get double hp, have haste etc.) on hardcore. Has anyone tried this before?

Edited by Penna, 30 January 2011 - 08:50 AM.


#2 Miloch

Miloch

    Barbarian

  • Modder
  • 6579 posts

Posted 30 January 2011 - 05:24 PM

I think they are hardcoded, but maybe they could be externalised with something like TobEx.

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#3 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 31 January 2011 - 02:21 AM

You could conceivably EXTEND_TOP the creatures' scripts with something like
IF
  Difficulty(HARDEST) //or whatever
  Global("prefix#boosted","LOCALS",0) //substitute with your prefix and whatever variable name you want to use
THEN
  RESPONSE #100
    ApplySpellRES("somespell",Myself) //spell that increases HP by 100%, grants haste etc
    SetGlobal("prefix#boosted","LOCALS",1)
    Continue()
END


#4 Fennek

Fennek
  • Member
  • 355 posts

Posted 31 January 2011 - 04:46 AM

I think there's a component in The Bigg's Tweaks (or another mod he made) where one can somehow split the difficulty setting into "HP/Damage" and "Other Things". But I have no idea if this helps you nor how it is done (maybe it simply adds a substitute for the difficulty setting).

#5 Penna

Penna
  • Member
  • 16 posts

Posted 31 January 2011 - 08:29 AM

You could conceivably EXTEND_TOP the creatures' scripts with something like


So I have to open up and modify the script of every single creature in the game?

Edited by Penna, 31 January 2011 - 08:32 AM.


#6 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 31 January 2011 - 09:12 AM

So I have to open up and modify the script of every single creature in the game?

Depending on how discriminating you wish to be and how much work you wish to put in it could be as easy as a having WeiDU do an EXTEND_TOP_REGEXP ".*\.bcs$" ~path/to/your/script~
Though you probably want a add an Allegiance(Myself,EVILCUTOFF) trigger to your script block in that case, or you'll have super-powered chickens and peasants running around.

#7 Penna

Penna
  • Member
  • 16 posts

Posted 01 February 2011 - 01:16 AM

Ok, so what I have to do is tell WeiDu to add the powerup script to every creature in the game. Thank you very much :) Well, I guess I'll have to go through the WeiDu tutorial again for I have no idea how to put this into practice, step by step.

Do you happen to know any good thread covering this EXTEND_TOP thing? Since the search function is not functional here :\ And also in your last post you used the command "EXTEND_TOP_REGEXP". Does that have anything to do with experients points?

#8 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 01 February 2011 - 06:01 AM

EXTEND_TOP and EXTEND_TOP_REGEXP do almost the same thing (add one or more script blocks to the start of a game script), except EXTEND_TOP takes a hard file name as part of its input, while EXTEND_TOP_REGEXP takes a regular expression instead. In this case the regular expression simply translates to anything that ends with ".bcs" (including files where ".bcs" is the entire file name).

To install it you would need to create a .tp2 file and go through the other (minor) steps of creating a WeiDU mod. The contents of your .tp2 file could be something to this effect:
BACKUP ~mymod/backup~ //replace mymod with whatever
AUTHOR Penna

BEGIN ~Buff enemies depending on difficulty~

EXTEND_TOP_REGEXP ".*\.bcs$" ~mymod/script.baf~

EXTEND_TOP_REGEXP is in the limit of minimum effort and minimum care, so you may see some unintended in-game effects from it [creatures who shouldn't get buffed getting buffed anyway] and there's plenty more you could do if you wanted to. The WeiDU readme is the place to go for information on WeiDU features and the IESDP is a good resource for information on scripting and similar. There are also a fair number of tutorials on different subjects posted here at SHS, as well as at other modding sites.

#9 Penna

Penna
  • Member
  • 16 posts

Posted 01 February 2011 - 06:44 AM

Thank you very much for your extensive help :)