Jump to content

Batch SetScale?


justinrpg

Recommended Posts

I want to create a new character in a world where all the male friendly NPCs are shrunken to SetScale 0.5 and all the female friendly NPCs are enlarged to SetScale 2 while keeping the player character normal size.

 

Currently, if I want to change a character's size, I click on them while in the console and type something like "SetScale 0.5" to shrink the individual. However, to do this on many NPCs, I would have to run around everywhere and manually set each one. That could take hours or even days.

 

Is there a way to be able to batch scale all the NPCs at once? Like could the command be used with FormIDs or something and write a .bat file? I would also need a list of all NPCs separated by male and female.

 

 

I do not want to do this to any non-humanoid NPC such as dogs or monsters. I might do a Flame Atronach here and there but I want all the males in a single save shrunken and all the females enlarged.

 

 

How can I go about doing this in Oblivion?

Link to comment
Share on other sites

Yes there is. You add a script to all NPC you add on the Isle with that console command you did mention or make a quest script.

 

It all depends on how many NPC thereis on the isle as it is fastest to just add a single script to each and everyone, well make 2 scripts. It can be done with one, but lets make it simple...

 

Female Script

Scn JustFemaleScaleSCR

Ref MySelf

Begin GameMode 

Set MySelf to GetSelf

Myself.SetScale 2

End

Male Script

Scn JustMaleScaleSCR

Ref MySelf

Begin GameMode 

Set MySelf to GetSelf

Myself.SetScale 0.5

End

if you want them to change scale at some point, well then we have to make a quest, which is very simple... ;) Just peek at the CS Wiki https://cs.elderscrolls.com/index.php?title=Main_Page

Link to comment
Share on other sites

  • 1 month later...

Why did you give me FAKE scripts!! NOT COOL!! I copied both these and saved them as Female.Bat and Male.bat and EVERY LINE on BOTH gives "syntax error" and "invalid command"

 

 

If there really was no way to do this then say so, why did you have to make something up and say it works

 

Neither of these scripts work. I JUST tried them! Not a single line in them works >:(

Link to comment
Share on other sites

This is not batch scripts. This is Oblivion scripts you only can use inside CS or CSE, no where else. Windows cannot change the scale inside your current game. It is only the game itself that can change that.

 

The Windows batch system can only handle files.

 

COPY file file

Rename File

MAKEDIR

 

and so on. CMD is the Microsoft BTACH Commander for handling files. NOTHING ELSE... ;) I did publish BATCH files to rename Oblivion files so we can play the game without CSE interfering and to use CSE when we have ENB in the game folder.

 

You must load CS or CSE in order to use my scripts. This Forum is about Oblivion and Oblivion modding not really about Windows Batch scripting, unless we do not create OBLIVION or TES specific Command scripts to make life easier renaming or handling our FILES. Script as script, different tools, different results but every scripting tool is useful in its own way never the less. Scripting and programming is powerful. Without them, no computers would never work or we would not have any games to play. We have Berkley University to thank for this, the way we code today with C++ and C#, invented 1969 for games really. They made all this to make it easy for them to make a text based game for networking. A RPG world.

Link to comment
Share on other sites

Why did you give me FAKE scripts!! NOT COOL!! I copied both these and saved them as Female.Bat and Male.bat and EVERY LINE on BOTH gives "syntax error" and "invalid command"

 

 

If there really was no way to do this then say so, why did you have to make something up and say it works

 

Neither of these scripts work. I JUST tried them! Not a single line in them works >:(

I AM using them in Oblivion!

 

I saved the bat files as female.bat and male.bat and typed bat female.bat into the console. and every line errored

 

I am NOT trying to use them through windows.

 

I am using the same method as I do to set my characters to 200 of a skill.

 

Say I type into notepad

 

modpcs acrobatics 200

modpcs alchemy 200

modpcs alteration 200

modpcs armorer 200

modpcs athletics 200

modpcs blade 200

modpcs block 200

modpcs blunt 200

modpcs conjuration 200

modpcs destruction 200

modpcs handtohand 200

modpcs heavyarmor 200

modpcs illusion 200

modpcs lightarmor 200

modpcs marksman 200

modpcs mercantile 200

modpcs mysticism 200

modpcs restoration 200

modpcs security 200

modpcs sneak 200

modpcs speechcraft 200

 

 

And save the file as skills.bat

 

I type into the Oblivion console bat skills.bat, the game sets all my skills to 200

 

 

I tried the same thing with the script codes you gave above and every line errored

Link to comment
Share on other sites

Ahh. Cool. I never tried that. Well the code I wrote will not work in the console. You can not initiate variables in console. You can change a variable at an object or a global variable.

Scn JustFemaleScaleSCR  ; Only works in a pure script

Ref MySelf ; Can never be done in console. Only in scripts, all 3 types of scripts you compile in CS or CSE.

Begin GameMode ; Can never be done in console. Only in scripts, in 2 types of scripts you compile in CS or CSE. Object Scipts and Quest Scripts

Next line can be done in console if you rename myself to the reference

Myself.SetScale 2 ; Do you have a reference with a real nam like this? Myself?

1234abcd.SetScale 2 ; Will work if you have a reference with that reference number 1234abcd but only for that specific reference.

What about end?

End ; Used to end begin. Begin GameMode, Begin MenuMode, Begin ScriptEffectStart

Read more about begin here: Begin - The Elder Scrolls Construction Set Wiki

 

Also read about Scn here and Scn = ScriptName

Scriptname - The Elder Scrolls Construction Set Wiki

 

 

Both these 2 examples in the code below gives the exact same result in game. A real scriptname must start with a name. batches do not as it is just a series of console commands that runs one time, hopefully

Scn MyScript

ScriptName Myscript

An ObjectScript that begins with scn or Scriptname followed by Begin GameMode at the next line, will run ones every single frame. When we save such a script inside CS or CSE, it will get compiled into Machine code that will look like this if you manage to read it at all:

 

12

a4

c4

ff

00

53

bc

 

I use hexadeciamal code. But in reality the CPU will see and execute the codes:

 

00010010

10100100

11000100

11111111

00000000

01010011

10111100

 

What will the CPU do with this code? I do not have a clue but if it is a real program, it will process every line in every clock cycle. Most likely crash really. If we send random number to it, it will crash I guess. We do not code like that. We code with words we will understand. The CPU does not understand English. it Understand 0 or/and 1 Power on, power off. That is how the transistor works. A CPU consists of many tiny transistors. It works like a form of Morse code.

 

Assembler is a bit easier. Each Assemble command is executed in 3-5 CPU clock cycles but that's not what the CPU is seeing. When you assemble the assemble code, the result will be:

 

00010010

10100100

11000100

11111111

00000000

01010011

10111100

 

Nothing else. This is how we control the CPU. We write in english, the compiler will translate it into machine code, a series of 8 0 and 1 together = 1 byte. 8 bits = 1 byte.

 

A batch script is interpreted by the console into machine code

A Windows or MS-DOS BAT is translated into machine Code as well by COMMAND or CMD as it is called these days. The real name was COMMAND during the early era of Microsoft. Our way of dealing with files and making premature menus in 16 colours before Windows came.

 

------------------------------

 

I am not sure anyone will understand what I just typed. I do not know any other way right now to describe what is going on either inside a computer. It took me ages o eons to understand this myself. I still do not understand it all... I work on it. I will work on it until i die. I want to know what my computer is doing in every detail. I am the master, the computer is my slave. I do not need to write that I also worked a lot within the IT area as technician?

Link to comment
Share on other sites

Another big difference between the scripts we make in CS and the console is how we use references.

 

Lets make an example as simple as possible:

 

Lets pretend we have reference with the reference number 12324abcd and we click at that object, which is a chest in CS or double click at it rather. We get a pop up window with the reference number, the coordinates and angles and scale and an empty field called name. We also get the opportunity to check 6 checkboxes and one is called: Persistent Reference.

 

All references are not persistent by default. Some are, like all actors. Every NPC and Creature is persistent.

 

We can use the reference numbers in the console but not names

We can use the names in a CS script but not the reference numbers.

 

If we want to use that chest in a script, we must add something to the empty field. Lets call it PekChest01Ref and I click the Checkbox for the persistent Reference and now i can use it from a CS script and we call it PekMainChestSCR

ScriptName PekMainChestSCR

Begin GameMode

PekChest01Ref.Additem IronSword 1

End

That script is a bit dangerous as it adds a sword to the chest every frame. If your game runs in 60 FPS, you get 60 swords every second. If you run the game for 4 hours, how many swords will get added to that chest?

 

If we want to add a single gold coin to the chest from the console we must type:

1234abcd.additem f 1

If we want to add a single gold coin to our chest from the Object CS Script, EVERY FRAME, in GameMode, we must type:

PekChest01Ref.Additem Gold001 1

Both the console and the CS script will do exact the same stuff. We do not use the console in the same way we use CS scripts. Every modder must be careful with Object Scripts really. How many gold coins can we add to a chest? A quest script runs ones every 3rd second by default. If we can use an object script as a quest script, it will save us resources and increase performance in game. For me, performance is everything. I rather use a quest script and I can check in which cell i am in, to allow the script to only run when we enter a specific cell.

Edited by Pellape
Link to comment
Share on other sites

Interesting, I admit I didn't know about bat command. But your example with modpcs commands had weird results on my computer. It didn't gave me 200 in skills as you said for some reason. And so I'm not convinced that you will have what you want this way. With almost 1000 NPC, creatures and alike it will be same work as editing them in CS.

Link to comment
Share on other sites

By the way: Before Basic and C, the machine code was the only way to code computers.

 

have you ever seen the computer that went to the moon 1969? The one Collins coded during the journey? He added numbers to it for every command he wanted it to perform. That simple computer was vital for the survival of the crew on Apollo 13. They where forced to add new instruction to that computer to be able to get home at all after the incident in space that almost killed them.

Edited by Pellape
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...