阮穆生

💡 本资源需花费 10 积分 下载 | 新用户注册即送 100 积分,可免费下载!

阮穆生

🎭 角色简介

阮穆生:
age: 28
gender: Male
identities:
– 大学城新式茶馆“不羡时”的老板
– 土生土长的二环内老北京
growth_experience: 生在红墙边儿,长在胡同里,阮穆生是地地道道的京城孩子。从小听着鸽子哨、闻着槐花…

💬 开场白

“`
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>开场白展示</title>
<style>
@import url("https://fontsapi.zeoseven.com/309/main/result.css");

:root {
–primary-color: #8c6d46;
–secondary-color: #d4b78c;
–accent-color: #a52a2a;
–bg-color: #f9f5f0;
–text-color: #3e2723;
–border-color: #c9a87c;
–shadow-color: rgba(140, 109, 70, 0.2);
}

body {
font-family: "KingHwaOldSong", "Noto Serif SC", serif;
background-color: var(–bg-color);
color: var(–text-color);
line-height: 1.6;
padding: 20px;
max-width: 800px;
margin: 0 auto;
/* 基础字体大小保持不变,PC端合适 */
font-size: 16px;
}

.opening-container {
background: white;
border-radius: 8px;
box-shadow: 0 4px 12px var(–shadow-color);
overflow: hidden;
margin-bottom: 20px;
}

.opening-header {
background: linear-gradient(to right, var(–primary-color), var(–secondary-color));
color: white;
padding: 15px 20px;
text-align: center;
font-size: 1.4em;
letter-spacing: 1px;
}

.content-section {
padding: 20px;
border-bottom: 1px dashed var(–border-color);
}

.content-section:last-child {
border-bottom: none;
}

.section-title {
font-size: 1.2em;
color: var(–primary-color);
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px solid var(–border-color);
font-weight: 600;
}

.author-info, .release-info {
display: flex;
align-items: center;
margin-bottom: 8px;
}

.info-icon {
width: 20px;
height: 20px;
background-color: var(–secondary-color);
border-radius: 50%;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8em;
color: white;
}

.intro-list {
list-style: none;
padding: 0;
margin-top: 20px; /* 增加与上方元素的间距 */
}

.intro-item {
position: relative;
padding: 12px 15px;
margin-bottom: 10px;
background-color: rgba(212, 183, 140, 0.1);
border-left: 3px solid var(–accent-color);
border-radius: 0 4px 4px 0;
transition: all 0.3s ease;
cursor: pointer;
padding-right: 50px;
}

.intro-item:hover {
background-color: rgba(212, 183, 140, 0.2);
transform: translateX(5px);
box-shadow: 0 2px 8px var(–shadow-color);
}

.intro-item:before {
content: "「";
color: var(–accent-color);
font-weight: bold;
margin-right: 5px;
}

.intro-item:after {
content: "」";
color: var(–accent-color);
font-weight: bold;
margin-left: 5px;
}

.item-number {
position: absolute;
top: 50%;
right: 10px;
transform: translateY(-50%);
font-size: 0.8em;
color: var(–primary-color);
background: rgba(140, 109, 70, 0.1);
padding: 4px 8px;
border-radius: 10px;
min-width: 24px;
text-align: center;
}

.click-hint {
font-size: 0.85em;
color: var(–primary-color);
text-align: center;
margin: 20px 0 15px 0; /* 增加上下边距,特别是下边距 */
padding: 12px 8px;
background: rgba(212, 183, 140, 0.1);
border-radius: 6px;
border: 1px dashed var(–border-color); /* 添加虚线边框增强视觉分隔 */
}

del {
color: #888;
text-decoration: line-through;
}

/* 平板设备优化 */
@media (max-width: 1024px) {
body {
font-size: 15px;
}

.opening-header {
font-size: 1.3em;
}

.section-title {
font-size: 1.15em;
}

.intro-item {
font-size: 0.95em;
}

.intro-list {
margin-top: 18px;
}

.click-hint {
margin: 18px 0 14px 0;
padding: 10px 8px;
}
}

/* 移动端优化 – 调整最小字体大小 */
@media (max-width: 768px) {
body {
font-size: 14px;
padding: 15px;
}

.content-section {
padding: 15px;
}

.intro-item {
padding: 12px 45px 12px 12px;
word-wrap: break-word;
overflow-wrap: break-word;
font-size: 0.9em; /* 减小移动端字体大小 */
}

.item-number {
right: 8px;
font-size: 0.7em;
padding: 3px 6px;
}

.opening-header {
font-size: 1.2em;
padding: 12px 15px;
}

.section-title {
font-size: 1.1em;
}

.click-hint {
font-size: 0.8em;
margin: 16px 0 12px 0;
padding: 10px 6px;
}

.info-icon {
width: 18px;
height: 18px;
font-size: 0.75em;
}

.intro-list {
margin-top: 16px;
}
}

/* 小屏幕手机优化 – 进一步减小字体 */
@media (max-width: 480px) {
body {
font-size: 13px; /* 进一步减小基础字体 */
padding: 10px;
}

.intro-item {
padding: 10px 40px 10px 10px;
font-size: 0.85em; /* 进一步减小开场白字体 */
}

.item-number {
right: 6px;
font-size: 0.65em;
padding: 2px 5px;
}

.opening-header {
font-size: 1.15em;
padding: 10px 12px;
}

.section-title {
font-size: 1.05em;
}

.click-hint {
font-size: 0.75em;
margin: 14px 0 10px 0;
padding: 8px 5px;
}

.info-icon {
width: 16px;
height: 16px;
font-size: 0.7em;
}

.intro-list {
margin-top: 14px;
}
}

/* 超小屏幕优化 – 最小字体设置 */
@media (max-width: 360px) {
body {
font-size: 12px; /* 设置最小基础字体 */
}

.intro-item {
font-size: 0.8em; /* 设置最小开场白字体 */
}

.opening-header {
font-size: 1.1em;
}

.section-title {
font-size: 1em;
}

.click-hint {
margin: 12px 0 8px 0;
padding: 6px 4px;
}

.intro-list {
margin-top: 12px;
}
}
</style>
</head>
<body>
<div class="opening-container">
<div class="opening-header">
角色开场白
</div>

<div class="content-section">
<div class="section-title">基本信息</div>
<div class="author-info">
<div class="info-icon">作</div>
<div>作者: Luuuuux</div>
</div>
<div class="release-info">
<div class="info-icon">发</div>
<div>该角色卡仅免费发布于DC社区旅程</div>
</div>
</div>

<div class="content-section">
<div class="section-title">开场白介绍</div>
<div class="click-hint">点击下方开场白可直接跳转</div>
<ul class="intro-list">
<li class="intro-item" onclick="jumpToScene(1)">
阮老板给你算算桃花运
<span class="item-number">01</span>
</li>
<li class="intro-item" onclick="jumpToScene(2)">
我是大富婆,你当我的小白脸
<span class="item-number">02</span>
</li>
<li class="intro-item" onclick="jumpToScene(3)">
怎么有人相亲吃炒肝啊!
<span class="item-number">03</span>
</li>
<li class="intro-item" onclick="jumpToScene(4)">
青梅竹马告白了怎么办
<span class="item-number">04</span>
</li>
<li class="intro-item" onclick="jumpToScene(5)">
遇到了躺平的前任,我去他怎么还在躺平
<span class="item-number">05</span>
</li>
<li class="intro-item" onclick="jumpToScene(6)">
高考完来阮哥哥家借住
<span class="item-number">06</span>
</li>
<li class="intro-item" onclick="jumpToScene(7)">
<del>(开盖即食)</del>DOI的时候让阮老板说"京爷冲击"
<span class="item-number">07</span>
</li>
</ul>
</div>
</div>

<script>
// — SillyTavern API 跳转函数 —
async function jumpToScene(swipeIndex) {
try {
// 检查 SillyTavern API 是否可用
if (typeof getChatMessages !== 'function' || typeof setChatMessage !== 'function') {
console.warn("SillyTavern API not found. Running in simulation mode.");
alert(`模拟跳转到开场白:${swipeIndex}`);
return;
}

// 获取聊天消息
const messages = await getChatMessages("0");
if (!messages || messages.length === 0) {
throw new Error("无法获取开场白消息。请确保聊天已开始且包含开场白。");
}

// 获取第一条消息(包含所有开场白)
const firstMessage = messages[0];
const totalSwipes = firstMessage.swipes.length;

// 验证索引范围(注意:索引0是美化部分,实际开场白从索引1开始)
if (swipeIndex < 1 || swipeIndex >= totalSwipes) {
throw new Error(`开场白索引 [${swipeIndex}] 超出范围。实际开场白索引范围为 1 到 ${totalSwipes-1}。`);
}

// 获取目标开场白内容
const targetSwipeContent = firstMessage.swipes[swipeIndex];

// 切换到目标开场白
await setChatMessage(
{ message: targetSwipeContent },
0,
{ swipe_id: swipeIndex, refresh: 'display_and_render_current' }
);

console.log(`成功切换到开场白 ${swipeIndex}`);

} catch (error) {
console.error("开场白切换失败:", error);

// 尝试使用 SillyTavern 的 slash 命令显示错误
if (typeof triggerSlash === 'function') {
triggerSlash(`/echo title="操作失败" severity=error ${error.message}`);
} else {
alert(`操作失败: ${error.message}`);
}
}
}

// 页面加载完成后的提示
document.addEventListener('DOMContentLoaded', function() {
console.log('开场白展示面板已就绪');
console.log('提示:索引0是美化部分,实际开场白从索引1开始');

// 添加键盘快捷键支持
document.addEventListener('keydown', function(e) {
// 数字1-7快速跳转到对应开场白(对应索引1-7)
if (e.key >= '1' && e.key <= '7') {
const index = parseInt(e.key); // 直接使用数字,因为索引从1开始
jumpToScene(index);
}
});
});
</script>
</body>
</html>
“`

角色卡

宿云归

2025-12-31 17:27:36

角色卡

祁曜

2025-12-31 17:27:44

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索