Editing Scripting Tutorial: Working with FormLists
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{Incomplete}} | |||
This article is a WIP. I'll try to finish it in the next few days.--[[User:Omzy|Omzy]] 00:50, 1 August 2009 (UTC) | |||
==IMPORTANT== | ==IMPORTANT== | ||
'''You will need [[ | '''You will need [[Fallout_Script_Extender]] for this tutorial.''' | ||
==Introduction== | ==Introduction== | ||
With the development of the GECK came several new object types and functions that were not seen in previous versions of Bethesda's game construction kits. One of the new object types that was added is called a FormList. A FormList is, naturally, a list of FormIDs of objects from the editor. | With the development of the GECK came several new object types and functions that were not seen in previous versions of Bethesda's game construction kits. One of the new object types that was added is called a FormList. A FormList is, naturally, a list of FormIDs of objects from the editor. | ||
(why were formlists created? DLC...) | |||
==Functions== | |||
(make a FormList Functions subcategory to place in Function Types) | |||
The creators of FOSE saw potential in FormLists and decided to flesh out their abilities with a handful of new functions that could manipulate them in scripts.(ask FOSE creators to confirm this or change it). This table shows all the FormList functions currently available to modders: | |||
Make a table here: | |||
The following functions are from the GECK (v?): | |||
*AddFormToFormList | |||
*IsInList | |||
*IsWeaponInList | |||
The following functions are from FOSE (v?): | |||
*ListAddForm | |||
*ref.ListAddReference | |||
*ListRemoveForm | |||
*ListRemoveNthForm | |||
*ListReplaceForm | |||
*ListReplaceNthForm | |||
*ListGetForm | |||
*ListGetNthForm | |||
*ListGetFormIndex | |||
*ListGetCount | |||
==Modifying FormLists== | ==Modifying FormLists== | ||
*create a list: can you do this dynamically? (just create it in the editor first) | |||
*adding forms to the list (which index do they start at if unspecified?) | |||
**ListAddForm | |||
**ref.ListAddReference | |||
*removing forms from the list | |||
**ListRemoveForm | |||
**ListRemoveNthForm | |||
*replacing forms in the list | |||
**ListReplaceForm | |||
**ListReplaceNthForm | |||
*getting forms from the list | |||
**ListGetForm | |||
**ListGetNthForm | |||
*getting form information | |||
**ListGetFormIndex | |||
**ListGetCount | |||
That | ==Lists of Lists...What?== | ||
As it would seem, a FormList is also an object in the editor, which has its own FormID. That makes a FormList a Form. What this means is that FormLists can contain other FormLists. This may seem a bit confusing if you've never learned any mid-level programming before, so lets look at the following script and see what it does: | |||
(script here) | |||
(add more scripting tricks/uses) | |||