Welcome Guest ( Log In | Register )

> AI Generated Modding Results, Asking AI for help
Renee
post Jan 19 2025, 05:38 PM
Post #1


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



I've been modding, quest-writing, and scripting for uh... eight years. I've watched a lot of tutorials (after a while these run out), bugged forumites on bulletin boards when I get stuck, which is usually dubious. Communication breakdowns, haughtiness, and so on. Or sometimes people generally want to help. They'll give me half-an-answer, yet I'm too bashful to ask for elaborations.

So screw it. I'm asking my favorite search engine's AI. That's what this thread shall be about. Will the answers actually work?

Question: How do I make a script which counts items? And I'm not just talking about the GetItemCount function, I'm talking about a script which collects item count data on the fly, from a specified container, and then displays some results.

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

Answer: Creating a script in the Oblivion Construction Set to count items in a player's inventory can be a fun and rewarding task. Here's a step-by-step guide to help you get started:

(I removed the obvious stuff, like how to start writing a script)


--Below is an example script that counts a specific item in the player's inventory. Let's say you want to count the number of Gold001 (gold coins) the player has.

scn CountGoldScript

short goldCount

begin GameMode
set goldCount to player.GetItemCount Gold001
; You can add additional logic here, such as displaying the count or triggering events
end
Save the Script:

Save the script with a meaningful name, such as CountGoldScript.
Attach the Script:

You can attach this script to an object, quest, or NPC depending on when and how you want the script to run. For example, if you want it to run continuously, you might attach it to a quest script.

Explanation

Script Name: CountGoldScript is the name of the script.
Variable Declaration: short goldCount declares a short integer variable to store the count of gold.
GameMode Block: The begin GameMode block runs the script every frame while the game is in progress.
GetItemCount: player.GetItemCount Gold001 gets the count of Gold001 (gold coins) in the player's inventory and stores it in goldCount.
Additional Tips
Display the Count: If you want to display the count to the player, you can use the MessageBox function.

scn CountGoldScript

short goldCount

begin GameMode
set goldCount to player.GetItemCount Gold001
MessageBox "You have %g gold coins.", goldCount
end
Trigger Events: You can add conditions to trigger events based on the item count.

scn CountGoldScript

short goldCount

begin GameMode
set goldCount to player.GetItemCount Gold001
if goldCount >= 1000
; Trigger an event, such as giving a reward
MessageBox "You have accumulated 1000 gold coins!"
endif
end

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

Did this work?: (answer to come)

This post has been edited by Renee: Jan 19 2025, 06:10 PM


--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies
Lena Wolf
post Jan 19 2025, 07:03 PM
Post #2


Master
Group Icon
Joined: 18-May 21
From: Bravil



I read this somewhere: "Letting an AI write a program is like giving a gourmet recipe to a fast food restaurant: you don't know what will come out but you can be sure it will be fried."


--------------------
"What is life's greatest illusion?"
"Innocence, my brother."

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Renee
post Jan 20 2025, 12:55 AM
Post #3


Councilor
Group Icon
Joined: 19-March 13
From: Ellicott City, Maryland



QUOTE(Lena Wolf @ Jan 19 2025, 01:03 PM) *

I read this somewhere: "Letting an AI write a program is like giving a gourmet recipe to a fast food restaurant: you don't know what will come out but you can be sure it will be fried."

Yeah, I realize this. tongue.gif I'm not blind to the fact that the idea of using AI seems horrible.

But I get to the point where I'm out of ideas. I get stuck. Hours begin to pile up, and I'm frustrated. I don't feel like posing some questions in a bulletin board which either get ignored, or only get half-answered!!!

I mean, what do you do when you get stuck?



--------------------
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lena Wolf
post Jan 20 2025, 10:16 AM
Post #4


Master
Group Icon
Joined: 18-May 21
From: Bravil



QUOTE(Renee @ Jan 19 2025, 11:55 PM) *

But I get to the point where I'm out of ideas. I get stuck. Hours begin to pile up, and I'm frustrated. I don't feel like posing some questions in a bulletin board which either get ignored, or only get half-answered!!!

I mean, what do you do when you get stuck?

First, I don't think you ever get ignored if your post your questions here. It isn't a large forum, true, but between SubRosa, Ghastley and myself we have all your three favourite games covered. So try us.

People don't generally ignore you because they want to be evil. A question can go unanswered because no one with the knowledge had seen it, or may be there is no one around who knows the answer. It can be half-answered for the same reason. People answer what they can.

When I get stuck, I start with the Useful Scripts in the Construction Set Wiki. Useful indeed, many solutions are posted there. If I am still stuck, I search for a mod that does something similar and see how they've done it. If still stuck, I abandon the problem. I examine closely what it is that I am trying to achieve in the end of the day, and how I can do without.


--------------------
"What is life's greatest illusion?"
"Innocence, my brother."

User is offlineProfile CardPM
Go to the top of the page
+Quote Post



Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

- Lo-Fi Version Time is now: 22nd June 2025 - 01:27 AM